Skip to content

Instantly share code, notes, and snippets.

View gretel's full-sized avatar
🚀
the jitter does know where it is at none time

Tom Hensel gretel

🚀
the jitter does know where it is at none time
View GitHub Profile
@gretel
gretel / yell_exceptions.rb
Last active August 29, 2015 14:06
tiny Rack middleware to have Yell::Logger log exceptions nicely.
# 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
### 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:
@gretel
gretel / gist:7b3666c13ac6612938c1
Last active August 29, 2015 14:24
configure_osx.sh
#!/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 October 12, 2015 11:16
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.
#!/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 December 21, 2015 10:17
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'.
#!/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 March 10, 2016 00:16
collection of useful, useless, dangerous sysctl settings for pinguin os
# 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 April 27, 2016 21:18
homebridge configuration
{
"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 18:32
personal and opinionated way of updating my development stuff
#!/bin/sh
#
printf "updating. please wait!\n\n"
### gpg
gpg2 --refresh-keys --keyserver hkps://pgp.mit.edu
### apple
printf "\nappstore:\n"
# mas install 443126292
# 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 June 9, 2016 19:51
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
<?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>