Skip to content

Instantly share code, notes, and snippets.

View consti's full-sized avatar
:shipit:
Focusing 🦄

Constantin Hofstetter consti

:shipit:
Focusing 🦄
View GitHub Profile
@consti
consti / gist:9881192
Created March 30, 2014 22:43
restart coreaudiod when airplay mirror display does not sync audio
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
function genie(){
query=`printf "%s+" $@`
echo $query
result=`curl -s "https://weannie.pannous.com/api?out=simple&input=$query"`
echo $result
say $result 2>/dev/null
}
alias hey=genie
alias how="genie how"
alias what="genie what"
@consti
consti / .Guardfile
Created July 3, 2014 05:55
~/.Guardfile
ignore %r{^ignored/path/}, /public/
filter /\.txt$/, /.*\.zip/
# change this to your local ip address (also install Growl)
notification :gntp, :host => '10.0.1.182'
group :frontend do
# guard :bundler do
# watch('Gemfile')
@consti
consti / .rubocop.yml
Created October 9, 2014 08:06
~/.rubocop.yml
Alias:
Enabled: false
AsciiComments:
Enabled: false
AsciiIdentifiers:
Enabled: false
BlockNesting:
⨀_⨀
⨂_⨂
(/◔ ◡ ◔)/
°ﺑ°
(¬_¬)
(´・ω・`)
(ʘ_ʘ)
(ʘ‿ʘ)
(ಠ_ಠ)
(ಠ‾ಠ)
@consti
consti / el_capitan.md
Last active September 11, 2015 03:01
Mac OS X El Capitan – Homebrew / Rails
  • Download the El Capitan Beta and install
  • Download and install XQuartz: https://xquartz.macosforge.org/landing/
  • Download the Xcode Beta and install (drag & drop into /Applications)
  • Rename Xcode-Beta.app to Xcode.app (remove old version)
  • Start Xcode.app and agree to ToS and finish installation
  • Start up iTerm/Terminal:
# Install Xcode extensions
xcode-select --install
@consti
consti / hack.sh
Created April 19, 2012 11:09 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@consti
consti / wtd_bangkok.md
Last active August 2, 2016 05:04
What to do in Bangkok

What to do in Bangkok

Allgemeines

Am Flughafen eine Prepaid Simkarte holen (kostet bei True Mobile ca. 400฿ für 30 Tage Internet) - dann Foursquare auf dem Handy installieren und Google Maps (BTS Stationen auf Thai!) und Apple Maps (BTS Stationen auf Englisch!) zur Navigation verwenden.

Geldautomaten in Thailand verrechnen beim Abheben mit einer Ausländischen Geldkarte bis zu 180฿ Gebühr. Deshalb am Besten immer gleich "ausreichend" Geld abheben bzw. Euro mitbringen und am Flughafen in Bangkok (Siam Commercial Bank) oder in der Stadt ("SuperRich Exchange") wechseln: der Kurs hier ist meistens sehr sehr gut.

Nicht auf den "Hat heute geschlossen, ich kann euch was anderes zeigen"-Trick reinfallen. Entspricht meistens nicht der Wahrheit (im Internet nachschauen) und führt nur zum Geschäft des Schwagers ("günstige Anzüge") oder dem Restaurant der Cousine ("real thai food") :).

@consti
consti / gist:8bb686c09c393917b874a88b10d2e31f
Created August 25, 2016 08:45
Bluetooth core settings Mac
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Max (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Apple Initial Bitpool Min (editable)" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Max" 80
defaults write com.apple.BluetoothAudioAgent "Negotiated Bitpool Min" 80
sudo killall bluetoothaudiod
@consti
consti / raspberry-pi-vpn-router.md
Created March 16, 2017 13:25 — forked from superjamie/raspberry-pi-vpn-router.md
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to: