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 / 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 / get_openbsd.sh
Last active Mar 13, 2021
get openbsd distribution files, and update the system in-place. this is very dangerous and you should not do it.
View get_openbsd.sh
#!/bin/sh
#
#MIRROR=https://ftp.bytemine.net/pub/OpenBSD/snapshots
#MIRROR=https://ftp.hostserver.de/pub/OpenBSD/snapshots
#MIRROR=https://ftp.openbsd.org/pub/OpenBSD/snapshots
MIRROR=https://cdn.openbsd.org/pub/OpenBSD/snapshots
if [ "$1" == "" ]; then
ARCH=`uname -p` # default
@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 / 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 / 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 / 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
@gretel
gretel / fix_brew.sh
Last active Jun 8, 2017
homebrew on 'brew update' brawling "Your local changes to the following files would be overwritten by merge" at you? add a scoop of shell!
View fix_brew.sh
#!/bin/sh
#
cd $(brew --repository)
git reset --hard FETCH_HEAD
cd $(brew --repository)/Library
git clean -fd
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 ->