Skip to content

Instantly share code, notes, and snippets.

@svdgraaf
svdgraaf / build
Created September 20, 2010 05:59
nginx + geo ip + secure download
$ ./configure --add-module=/home/svdgraaf/tmp/nginx/ngx_http_bytes_filter_module-57365655ee44 --with-http_geoip_module --add-module=/home/svdgraaf/tmp/nginx/ngx_secure_download
@haacked
haacked / TestHelper.cs
Created January 14, 2012 07:25
String Comparison Unit Test Helper
public static class TestHelpers
{
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue)
{
ShouldEqualWithDiff(actualValue, expectedValue, DiffStyle.Full, Console.Out);
}
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue, DiffStyle diffStyle)
{
ShouldEqualWithDiff(actualValue, expectedValue, diffStyle, Console.Out);
@isaacs
isaacs / .gitconfig
Created June 8, 2012 19:01
These are my shortcuts for git.
# A bunch of the stuff above relies on this, especially the aliases.
[user]
# you probably want to change this bit.
name = isaacs
email = i@izs.me
signingkey = 0x6C481CF6
[alias]
ci = commit
st = status
br = branch
@JamieMason
JamieMason / user.conf
Created August 3, 2012 07:40
Apache .conf to disable caching for localhost
<Directory "/Users/jdog/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
ServerName localhost
DocumentRoot /Users/jdog/Sites/
@devicenull
devicenull / gist:3896763
Created October 16, 2012 01:25
Clonezilla Live iPXE config
:imaging
set image_name your-image-name
kernel http://${next-server}/tools/clonezilla-live/vmlinuz initrd=tools/clonezilla-live/initrd.img boot=live live-config noswap nolocales edd=on nomodeset ocs_daemonon="ssh" ocs_live_run="ocs-live-restore" ocs_live_extra_param="--batch -g auto -e1 auto -e2 -r -j2 -p reboot restoredisk ${image_name} sda" ocs_live_keymap="/usr/share/keymaps/i386/qwerty/us.kmap.gz" ocs_live_batch="yes" ocs_lang="en_US.UTF-8" vga=788 nosplash fetch=http://${next-server}/tools/clonezilla-live/filesystem.squashfs ip=eth0:${netX/ip}:${netX/netmask}:${netX/gateway}:8.8.8.8 ocs_prerun="mount -t nfs ${next-server}:/home/partimag /home/partimag"
initrd http://${next-server}/tools/clonezilla-live/initrd.img
boot
@jtdp
jtdp / gist:5443297
Last active March 13, 2024 12:58
See changes before pulling from remote git repository
# fetch the changes from the remote
git fetch origin
# show commit logs of changes
git log master..origin/master
# show diffs of changes
git diff master..origin/master
# apply the changes by merge..
@BlakeGardner
BlakeGardner / install nano.sh
Last active April 23, 2024 20:22
Syntax highlighting in nano on Mac OS
# Last updated March, 2022 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 "/opt/homebrew/share/nanorc/*.nanorc"' >> ~/.nanorc
# close and re-open your terminal and you'll have syntax highlighting
@mrchief
mrchief / LICENSE.md
Last active March 23, 2024 12:28
Add "Open with Sublime Text 2" to Windows Explorer Context Menu (including folders)

MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

OS=[
ARCH="x86_64",
BOOT="network" ]
CPU="1"
MEMORY="768"
DISK=[
IMAGE="empty_10gb_disk" ]
NIC=[
@wishfoundry
wishfoundry / gist:7036457
Last active April 1, 2022 05:18
Set OSX default text editor to sublime text 3 instead of TextEdit
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'