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 / 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 / get_openbsd.sh
Last active March 13, 2021 00:13
get openbsd distribution files, and update the system in-place. this is very dangerous and you should not do it.
#!/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 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 / 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 / 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 / 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
@gretel
gretel / fix_brew.sh
Last active June 8, 2017 18:32
homebrew on 'brew update' brawling "Your local changes to the following files would be overwritten by merge" at you? add a scoop of shell!
#!/bin/sh
#
cd $(brew --repository)
git reset --hard FETCH_HEAD
cd $(brew --repository)/Library
git clean -fd
# 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 ->