Skip to content

Instantly share code, notes, and snippets.

View glaszig's full-sized avatar

glaszig

  • available for hire. contact me.
  • remote
View GitHub Profile
@glaszig
glaszig / fingerprint.sh
Created September 4, 2015 20:40
show ssl fingerprints for remote hosts
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: `basename $0` hostname [hostname]..."
exit $E_NOARGS
fi
until [ -z "$1" ]; do
host=$1
@glaszig
glaszig / passlib_plugin.py
Created August 12, 2015 22:52
ansible passlib filter plugin
# this ansible/jinja2 filter plugin allows you to use passlib's *_crypt functions
# until ansible 2.0 comes out - see https://github.com/ansible/ansible/issues/11244.
#
# this filter depends on passlib being installed:
# $ pip install passlib
#
# put this into your playbook's `filter_plugins` folder.
#
# usage example:
# - name: create user
@glaszig
glaszig / upload.rake
Created July 16, 2014 14:05
Upload task for Capistrano 3
namespace :deploy do
desc "Uploads a comma-separated list of files from ENV['files']"
task :upload do
on roles(:app) do
ENV.fetch('files', ENV['FILES']).split(',').map(&:strip).each do |file|
upload! file, current_path.join(file), recursive: true
end
end
end
end
@glaszig
glaszig / gist:10606804
Last active August 29, 2015 13:59
t.co fuck-up
$ curl -i http://t.co/OKqKyWmofP
HTTP/1.1 404 Not Found
Date: Sun, 13 Apr 2014 23:39:33 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Content-Length: 268
Connection: close
Content-Type: text/html; charset=UTF-8
<head><noscript><meta http-equiv="refresh" content="0;url=http://fernsehkritik.tv/folge-134/Start/"></noscript><script type="text/javascript">window.location = "http://18tdn.com/r.php?r=http%3A%2F%2Ffernsehkritik.tv%2Ffolge-134%2FStart%2F&ase=d47c5f40"</script></head>
@glaszig
glaszig / ABOUT
Created October 7, 2012 12:23 — forked from ngabel/ABOUT
A custom class that lets you use property accessor syntax to set/get member vars. (Works very much like NSManagedObject)
If you use this code it would be great to receive a credit and link back in your app! Thanks.
-Niels Gabel
PlacePop Inc
http://placepop.com
http://nielsbot.com