Skip to content

Instantly share code, notes, and snippets.

@Akhil-Suresh
Akhil-Suresh / postman_installation.md
Last active December 27, 2024 22:56
Installing Postman on Ubuntu/Debian

Installing Postman

Step 1

If any version of postman is installed we need to remove it

sudo rm -rf /opt/Postman

Step 2

@varqox
varqox / install_debian_with_debootstrap_howto.md
Last active December 27, 2024 22:54
Instructions how to install Debian using debootstrap
@unique1984
unique1984 / installer.sh
Last active December 27, 2024 22:54
OpenZFS - ZFS as a Root File System on Debian Bullseye
#!/usr/bin/env bash
###########################################################################################################
# Bash Script of this Documentation :
# https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Bullseye%20Root%20on%20ZFS.html#debian-bullseye-root-on-zfs
#
# Copyright © 2022 - installer.sh
# Yasin Karabulak
# [email protected]
# https://github.com/unique1984
#
@drofp
drofp / tmux_iterm_scrollback.md
Created March 30, 2021 16:49
Tmux iterm integration tips and best practices

Change scrollback limit for tmux buffer on iterm

Original stackoverflow post here

Solution

  • iTerm2 build 1.0.0.20130302 has an preference which enables it to capture scrollback even when a so-called hard status line is present:
  • maybe also check "Save lines to scrollback in alternate screen mode"
@kingreza
kingreza / PokerEngine.swift
Last active December 27, 2024 22:51
A simple poker engine that deals cards and detects various hands.
//
// main.swift
// PokerTest
//
// Created by Reza Shirazian on 11/8/19.
// Copyright © 2019 Reza Shirazian. All rights reserved.
//
import Foundation
@jboner
jboner / latency.txt
Last active December 27, 2024 22:50
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@dcchambers
dcchambers / md2pdf.md
Last active December 27, 2024 22:47
Generate a PDF from Markdown files with Pandoc

Generate a PDF from a Markdown file with Pandoc

Easy Steps For Mac OS

  1. Have Homebrew installed and a markdown file you want to render to PDF.
  2. Install Pandoc brew install pandoc
  3. Install basictex brew cask install basictex - needed for the pdflatex tool.
  4. Symlink the pdflatex to your /usr/local/bin so pandoc can easily find it. ln -s /Library/TeX/Root/bin/x86_64-darwin/pdflatex /usr/local/bin/pdflatex
  5. Use Pandoc to generate a PDF from a Markdown file. pandoc input.md -o output.pdf
  • By default the margins are pretty large. To optionally change the margins: pandoc input.md -o output.pdf -V geometry:margin=1in
@peppergrayxyz
peppergrayxyz / qemu-vulkan-virtio.md
Last active December 27, 2024 22:44
QEMU with VirtIO GPU Vulkan Support

QEMU with VirtIO GPU Vulkan Support

With its latest reales qemu added the Venus patches so that virtio-gpu now support venus encapsulation for vulkan. This is one more piece to the puzzle towards full Vulkan support.

An outdated blog post on clollabora described in 2021 how to enable 3D acceleration of Vulkan applications in QEMU through the Venus experimental Vulkan driver for VirtIO-GPU with a local development environment. Following up on the outdated write up, this is how its done today.

Definitions

Let's start with the brief description of the projects mentioned in the post & extend them:

@truemogician
truemogician / upgrading_postgresql_in_windows.md
Last active December 27, 2024 22:38
Upgrading PostgreSQL in Windows

Upgrading PostgreSQL in Windows

The official documentation for PostgreSQL provides a guide to upgrading using pg_upgrade. However, it can be a bit like a treasure hunt with hidden traps. This gist will walk you through a clear and robust method for upgrading PostgreSQL on Windows, using the upgrade from version 14 to 16 as an example.

1. Install the New Version of PostgreSQL

Before you embark on the upgrade journey, make sure you have the new version installed. This is because the pg_upgrade utility used during the upgrade process belongs to the newer version.

To get started, visit the official download page, download the installer, and run it. A word of caution: do not overwrite the old installation, as you'll need its binaries and data for the upgrade.

// routes1.go
func Routes1(mux *http.ServeMux) {
mux.Handle("/route1/a", handler1A)
mux.Handle("/route1/b", handler1B)
mux.Handle("/route1/c", handler1C)
}
// routes2.go
func Routes2(mux *http.ServeMux) {
mux.Handle("/route2/x", handler2X)