This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use Getopt::Std; | |
# Deliberately corrupt a JPEG file. | |
# | |
# ./j0rrupt0r.pl -i nice.jpg -o corrupt.jpg | |
# Initial fraction of the image that won't be considered | |
# for corruption (1/fraction) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /usr/local/bin/ssh-agent-bootstrap | |
# | |
# To run ssh-agent as an application user in the background | |
# | |
# Sourced from the user's ~/.bash_profile: | |
# . /usr/local/bin/ssh-agent-bootstrap | |
# | |
# In application startup, add: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Kommentare auf Newsseiten ausblenden | |
// @namespace https://gist.github.com/mschmitt/cebf0ee4e56a746cb856/raw/KommentareAufNewsseitenAusblenden.user.js | |
// @description Kommentare auf Newsseiten ausblenden | |
// @include /^https?:\/\/(www\.|)spiegel\.de\/.*/ | |
// @include /^https?:\/\/(www\.|)tagesschau\.de\/.*/ | |
// @include /^https?:\/\/(www\.|)heise\.de\/.*/ | |
// @version 1 | |
// @grant GM_addStyle | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use diagnostics; | |
use pQuery; | |
use LWP::Simple; | |
use JSON; | |
use Getopt::Std; | |
# A script to download a user's pics from twitpic before the shutdown | |
# in September 2014. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gzip -dcf /var/log/mail.info* | | |
perl -ne '/TLS connection established (to|from) (.+): (.+) with cipher/&&printf"%s %s %s\n",$1,$2,$3;' | | |
grep -v TLS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am mschmitt on github. | |
* I am mschmitt (https://keybase.io/mschmitt) on keybase. | |
* I have a public key whose fingerprint is 1949 CE6E 01C3 C6A5 FAD9 6200 79F9 5F49 DF23 6BA4 | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A wrapper for acme-tiny to do automatic cert rollovers. | |
# | |
# Certs/Keys/Requests are stored as | |
# /opt/letsencrypt/domains/*/{crt,key,csr}.pem | |
# | |
# .well-known/acme-challenge directories in document roots | |
# are writable for the user "letsencrypt" who runs this script | |
# and symlinked as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
IP4=$(curl -s http://www.ipv4.dyn.f00.net/ip.php) && | |
ORG4=$(curl -s http://ipinfo.io/ | jshon -e org) && | |
echo IPv4: $IP4 / $ORG4 | |
IP6=$(curl -s http://www.ipv6.dyn.f00.net/ip.php) && | |
ORG6=$(curl -s http://ipinfo.io/ | jshon -e org) && | |
echo IPv6: $IP6 / $ORG6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl -MIO::Socket::INET -e 'open I,"</etc/services";while(<I>){ | |
(/^\s*($|#)/)&&next;($n,$p,@j)=split/\s+/;($p=~s/\/tcp//)||next; | |
$s=IO::Socket::INET->new(PeerAddr=>$ARGV[0], PeerPort=>$p,Proto=>'tcp')? | |
print"$n($p)-->Open\n":next}' 192.168.12.34 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Convert any text file to syntax highlighted HTML | |
vim -c TOhtml -c 'w' -c 'qa' "$1" |