Skip to content

Instantly share code, notes, and snippets.


Tobias Hochgürtel tobiashochguertel

View GitHub Profile
svdgraaf / build
Created Sep 20, 2010
nginx + geo ip + secure download
View build
$ ./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
JamieMason / user.conf
Created Aug 3, 2012
Apache .conf to disable caching for localhost
View user.conf
<Directory "/Users/jdog/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
<VirtualHost *:80>
ServerName localhost
DocumentRoot /Users/jdog/Sites/
jtdp / gist:5443297
Last active Nov 22, 2020
See changes before pulling from remote git repository
View gist:5443297
# 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 / install
Last active Nov 18, 2020
Syntax highlighting in nano on Mac OS
View install
# install Homebrew if you don't already have it:
# install nano from homebrew
brew install nano
# update your nanorc file with the contents of the nanorc file below
nano ~/.nanorc
# close and re-open your terminal and you'll have syntax highlighting
mrchief /
Last active Oct 13, 2020
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:

BOOT="network" ]
IMAGE="empty_10gb_disk" ]
wishfoundry / gist:7036457
Last active Sep 3, 2020
Set OSX default text editor to sublime text 3 instead of TextEdit
View gist:7036457
defaults write LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'
pablochacin /
Last active Aug 28, 2020
A one liner to parse a http query string in bash
# the following one liner creates a shell variable from every parameter in a
# the query string in the variable QUERY, of the form p1=v1&p2=v2,... and sets it to
# the corresponding value so that parameters can be accessed by its name $p1, $p2, ...
for p in ${QUERY//&/ };do kvp=( ${p/=/ } ); k=${kvp[0]};v=${kvp[1]};eval $k=$v;done
welbornprod / Embedded Python in BASH
Created Aug 14, 2014
A little trick to embed python code in a BASH script.
View Embedded Python in BASH
# Here are some embedded Python examples using Python3.
# They are put into functions for separation and clarity.
# Simple usage, only using python to print the date.
# This is not really a good example, because the `date`
# command works just as well.
function date_time {
AndreasPizsa / gist:4eea7957553ed661c4df
Created Nov 7, 2014
Fix Bluetooth Audio hickups on Mac OS X
View gist:4eea7957553ed661c4df
defaults write "Apple Bitpool Max (editable)" 80
defaults write "Apple Bitpool Min (editable)" 48
defaults write "Apple Initial Bitpool (editable)" 40
defaults write "Negotiated Bitpool" 48
defaults write "Negotiated Bitpool Max" 53
defaults write "Negotiated Bitpool Min" 48
defaults write "Stream – Flush Ring on Packet Drop (editable)" 30
defaults write "Stream – Max Outstanding Packets (editable)" 15
defaults write "Stream Resume Delay" "0.75"
You can’t perform that action at this time.