Skip to content

Instantly share code, notes, and snippets.

View Dids's full-sized avatar
🏠
Working from home

Pauli Jokela Dids

🏠
Working from home
View GitHub Profile
@tdd
tdd / gitconfig.ini
Last active April 17, 2024 10:04
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = your@email.tld
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
# List available aliases
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@lackac
lackac / haproxy.cfg
Created September 22, 2012 19:14
HAProxy configuration with Websocket support
global
maxconn 4096 # Total Max Connections. This is dependent on ulimit
nbproc 2
log 127.0.0.1 local1 notice
defaults
mode http
log global
frontend all 0.0.0.0:80
@BlakeGardner
BlakeGardner / install nano.sh
Last active May 14, 2024 06:45
Syntax highlighting in nano on Mac OS
# Last updated May, 2024 for Apple silicon Macs
# Install Homebrew if you don't already have it: https://brew.sh
# install nano from homebrew
brew install nano nanorc
# update your nanorc file
echo 'include "'"$(brew --cellar nano)"'/*/share/nano/*.nanorc"' >> ~/.nanorc
# close and re-open your terminal and you'll have syntax highlighting
@Velrok
Velrok / random_name_generator.clj
Created September 28, 2013 11:45
Random name generator using combining adjectives with animals.
(def adjectives [
"adorable"
"adventurous"
"aggressive"
"alert"
"attractive"
"average"
"beautiful"
"blue-eyed "
"bloody"

THIS DOCUMENT

IS OUT OF

DATE

C++ Coding Standards Part 0: Automated Code Analysis

Automated analysis is the main advantage to working with a modern statically typed compiled language like C++. Code analysis tools can inform us when we have implemented an operator overload with a non-canonical form, when we should have made a method const, or when the scope of a variable can be reduced.

@shamil
shamil / mount_qcow2.md
Last active June 11, 2024 03:56
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@igilham
igilham / setup-mac.sh
Created October 3, 2014 15:49
Automate setting up software from a fresh install on Mac OS X
#!/bin/sh
# mac setup automation script based on
# http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active June 2, 2024 09:37
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@timlinux
timlinux / coreos-docker.md
Last active January 27, 2024 13:02
Setting up a hetzner machine with coreos

This gist describes how to set up a new machine running coreos.

Create an ssh key

ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa_kartoza99

Get the public key: