Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
hacking home at home

Tom Hensel gretel

🏠
hacking home at home
View GitHub Profile
@gretel
gretel / yell_exceptions.rb
Last active Aug 29, 2015
tiny Rack middleware to have Yell::Logger log exceptions nicely.
View yell_exceptions.rb
# tom@jitter.eu https://gist.github.com/gretel/388f14f1de38174ea790 09/2014 MIT License
# Rack middleware to Yell (https://github.com/rudionrails/yell) exceptions
# config.ru:
# require 'yell_exceptions'
# use Rack::YellExceptions
require 'yell'
module Rack
View gist:0332b58eb9d80bfec1cb
### Keybase proof
I hereby claim:
* I am gretel on github.
* I am jitter (https://keybase.io/jitter) on keybase.
* I have a public key whose fingerprint is C43A A43C A702 5CB0 5088 76EF 8BD3 83A4 640F 9BDD
To claim this, I am signing this object:
View gist:7b3666c13ac6612938c1
#!/bin/sh
#
# shamelessly ripped off https://github.com/bucaran/darwin/blob/master/darwin - thanks!
# TODO: integrate in https://github.com/gretel/lubrick
echo "Disable the sound effects on boot"
sudo nvram SystemAudioVolume=" "
echo "Set sidebar icon size to small"
defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 1
@gretel
gretel / install_nokogiri_osx.sh
Last active Oct 12, 2015
on osx, install nokogiri gem can be tricky due to issues. so this does the job fine for me. mind version numbers, might change due to fresh brew.
View install_nokogiri_osx.sh
#!/bin/sh
# https://gist.github.com/gretel/360872d0145797137303
# # install homebrew
# ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# brew doctor
brew update
brew unlink libxml2 libxslt
brew uninstall libxml2 libxlt
@gretel
gretel / ssc
Last active Dec 21, 2015
Use 'ssc' (this script) instead of 'ssh' to do your ssh logins. Without a 3rd argument it will list available screens. Given a 3rd argument it will either reattach an existing screen or create a new screen, i.e. 'ssc host.tld session'.
View ssc
#!/usr/bin/env perl
#
# taken from https://stackoverflow.com/a/1075807/1972627 (Daniel Reeves)
# slightly modified by tom hensel <tom@jitter.eu>
# https://gist.github.com/gretel/c2ef247f51e3cf0c654e
#
# Use 'ssc' (this script) instead of 'ssh' to do your ssh logins.
# Without a 3rd argument it will list available screens.
# Given a 3rd argument it will either reattach an existing screen or create a new screen,
# i.e. 'ssc host.tld session'.
@gretel
gretel / linux_sysctl.conf
Last active Mar 10, 2016
collection of useful, useless, dangerous sysctl settings for pinguin os
View linux_sysctl.conf
# https://gist.github.com/gretel/6e7568f35dd3c3284600
fs.file-max=65535
fs.inotify.max_queued_events=65536
fs.inotify.max_user_watches=65536
fs.suid_dumpable=0
kernel.core_uses_pid=1
kernel.kptr_restrict=1
kernel.pid_max=65536
kernel.printk=4 4 1 7
kernel.randomize_va_space=1
@gretel
gretel / config.json
Created Apr 27, 2016
homebridge configuration
View config.json
{
"bridge": {
"name": "CRS Cyber",
"username": "AA:BB:CC:00:11:22",
"port": 51826,
"pin": "000-000-000"
},
"description": "CRS Cyber Control",
"accessories": [
{
@gretel
gretel / update.sh
Last active May 16, 2016
personal and opinionated way of updating my development stuff
View update.sh
#!/bin/sh
#
printf "updating. please wait!\n\n"
### gpg
gpg2 --refresh-keys --keyserver hkps://pgp.mit.edu
### apple
printf "\nappstore:\n"
# mas install 443126292
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@gretel
gretel / private.xml
Last active Jun 9, 2016
mappings for my kezboard with capslock mapped to hyper and stuff using karabiner and seil https://pqrs.org/osx/karabiner/xml.html.en https://pqrs.org/osx/karabiner/seil.html.en
View private.xml
<?xml version="1.0"?>
<!-- https://gist.github.com/gretel/b00af6a15724bd839d37a5622474958b -->
<root>
<devicevendordef>
<vendorname>APPLE_COMPUTER</vendorname>
<vendorid>0x05ac</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>MACBOOK_PRO</productname>
<productid>0x0246</productid>