Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Tobias Hochgürtel tobiashochguertel

🎯
Focusing
View GitHub Profile
@AndreasPizsa
AndreasPizsa / gist:4eea7957553ed661c4df
Created Nov 7, 2014
Fix Bluetooth Audio hickups on Mac OS X
View gist:4eea7957553ed661c4df
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 48
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 40
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 48
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 53
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 48
defaults write com.apple.BluetoothAudioAgent "Stream – Flush Ring on Packet Drop (editable)" 30
defaults write com.apple.BluetoothAudioAgent "Stream – Max Outstanding Packets (editable)" 15
defaults write com.apple.BluetoothAudioAgent "Stream Resume Delay" "0.75"
@welbornprod
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
#!/bin/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 {
@pablochacin
pablochacin / parse_query.sh
Last active Aug 28, 2020
A one liner to parse a http query string in bash
View parse_query.sh
#
# 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
@wishfoundry
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 com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}'
View base-vm.one
OS=[
ARCH="x86_64",
BOOT="network" ]
CPU="1"
MEMORY="768"
DISK=[
IMAGE="empty_10gb_disk" ]
NIC=[
@mrchief
mrchief / LICENSE.md
Last active Oct 13, 2020
Add "Open with Sublime Text 2" to Windows Explorer Context Menu (including folders)
View LICENSE.md

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:

@BlakeGardner
BlakeGardner / install nano.sh
Last active Nov 18, 2020
Syntax highlighting in nano on Mac OS
View install nano.sh
# install Homebrew if you don't already have it: http://mxcl.github.io/homebrew/
# 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
@jtdp
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..
@JamieMason
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
</Directory>
<VirtualHost *:80>
ServerName localhost
DocumentRoot /Users/jdog/Sites/
@svdgraaf
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
You can’t perform that action at this time.