Skip to content

Instantly share code, notes, and snippets.

View s7nio's full-sized avatar

Sebastian Steiner s7nio

View GitHub Profile
@s7nio
s7nio / git-file-deleted.sh
Last active December 23, 2015 05:59
Git: delete files from git index when they are already deleted from fs
git ls-files --deleted -z | xargs -0 git rm
git add -u
@s7nio
s7nio / git-delete-history.sh
Created September 17, 2013 07:53
Script to permanently delete files/folders from your git repository
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-delete-history path1 path2
if [ $# -eq 0 ]; then
exit 0
@s7nio
s7nio / link-event-worldclock
Created September 17, 2013 09:10
Event Worldclock
@s7nio
s7nio / mac-tm-disable-local-snapshots.sh
Created September 17, 2013 09:33
mac: disable local snapshots feature of time machine
# disable local snapshots feature of time machine
sudo tmutil disablelocal
# undo
#sudo tmutil enablelocal
# delete all mobile backups
# repeat after every new backup drive selection
sudo rm -r /.MobileBackups
@s7nio
s7nio / freebsd commands
Last active August 29, 2015 14:00
freebsd update
# security updates for FreeBSD
freebsd-update fetch
freebsd-update install
# update system
portsnap fetch
portsnap extract
portsnap update
portmanager -u -l
@s7nio
s7nio / doctoc-install.sh
Created May 25, 2014 23:25
node package which generate table of content (toc) from markdown (.md)
npm install -g doctoc
@s7nio
s7nio / vagrant cleanup
Created August 29, 2014 16:37
remove invalid entries from the global index
vagrant global-status --prune
@s7nio
s7nio / varnish-cache.sh
Created August 29, 2014 22:16
install varnish cache on freebsd
cd /usr/ports/www/varnish && make install clean
pkg_add -r varnish
@s7nio
s7nio / gist:3aa4aeafe413cc4db699
Created August 29, 2014 22:44
SSL & DNS (DANE)
https://www.ssllabs.com/ssltest/
http://www.heise.de/security/meldung/DANE-disruptiv-Authentifizierte-OpenPGP-Schluessel-im-DNS-2268917.html
@s7nio
s7nio / npm-debug.log
Created October 28, 2015 19:57
tessel-1-install-mac-10.11.1
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/4.2.1/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli '-g',
1 verbose cli 'tessel' ]
2 info using [email protected]
3 info using [email protected]
4 verbose install initial load of /usr/local/lib/package.json
5 verbose readDependencies loading dependencies from /usr/local/lib/package.json