Skip to content

Instantly share code, notes, and snippets.

Ján Sáreník jsarenik

Block or report user

Report or block jsarenik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View NoCaps.ahk
^!n::
*CapsLock::Control ; CapsLock
View ssh-callback.sh
#!/bin/sh
CSTRING=${1:-'user@my-machine'}
ssh -f $CSTRING -R 12345:localhost:22 "sh -c 'while true; do sleep 360; done'"
View jQuery.js
jQuery(document).ready(function(){
$("span").text("$100");
});
@jsarenik
jsarenik / dnstest.sh
Last active Aug 29, 2015
Test responsiveness of all TLD nameservers
View dnstest.sh
#!/bin/bash
set -m
test "$1" = "-n" && { opt=+norecurse; shift; }
DOMAIN=${1:-'apiary.io'}
TLD=${DOMAIN##*.}
dig -t NS +noadditional ${TLD}. @a.root-servers.net \
| grep "^${TLD}." \
| while read one two three four five
View test-subdomains.sh
#!/bin/bash
TESTDOMAIN=${1:-'embed.apiary.io'}
trap "exit 1" INT
OUTPUTLINES=`dig +short ${TESTDOMAIN}. @8.8.8.8 | wc -l`
servers="
208.80.68.212
204.14.152.2
204.14.152.5
View gpg-tutorial.txt
$ brew install gnupg
...
$ gpg --gen-key
gpg (GnuPG) 1.4.19; Copyright (C) 2015 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
@jsarenik
jsarenik / .forward
Created Apr 30, 2015
dotForward file
View .forward
"|IFS=' ' && exec /usr/bin/procmail || exit 75 #jasan"
@jsarenik
jsarenik / .procmailrc
Created Apr 30, 2015
Procmail configuration
View .procmailrc
VERBOSE=on
MAILDIR=$HOME/Mail # elm users might use $HOME/Mail instead
PMDIR=$HOME/.procmail
DEFAULT=/var/spool/mail/jasan
LOGFILE=$PMDIR/log
#SENDMAIL=/usr/sbin/sendmail
#SENDMAILFLAGS=-oi
:0c
* ^To: jasan\+dmarc@.*
@jsarenik
jsarenik / processmail.sh
Created Apr 30, 2015
Forward mail with proper DKIM signature
View processmail.sh
#!/bin/sh
tmpfile=`mktemp /tmp/processmail.XXXXXXX.eml`
trap "rm -rf $tmpfile $tmpfile.dir" EXIT
cat > $tmpfile
mkdir $tmpfile.dir
ripmime -i $tmpfile -d $tmpfile.dir
TO=`grep "^To:" $tmpfile`
TO=${TO##* }
@jsarenik
jsarenik / compile-toolchain.sh
Last active Aug 29, 2015
compile-toolchain.sh
View compile-toolchain.sh
#!/bin/sh -ex
#
# $ ls toolchain/src/
# gcc-4.8.4.tar.gz mpc-1.0.3.tar.gz
# gmp-6.0.0a.tar.xz mpfr-3.1.2.tar.gz
# $ cat /etc/debian_version
# 6.0.10
export LC_ALL=C
export LANG=C
You can’t perform that action at this time.