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 check.sh
#!/bin/sh
#
# https://tunnelbroker.net/tunnel_detail.php?tid=$TID
TID=1234567
HEUSER=login
HEPASS=Update_Key_from_Tunnel_Details/Advanced
CHECK_DNS=you.dns.he.dynamically.updated.domain
URL="https://$HEUSER:$HEPASS@ipv4.tunnelbroker.net/nic/update?hostname=$TID"
@jsarenik
jsarenik / git-delmerged.sh
Created Dec 15, 2015
Script that deletes all git branches that were already merged to current one
View git-delmerged.sh
#!/bin/sh
git branch --merged | grep -v "^\*\|master" | xargs -r -n 1 git branch -d
@jsarenik
jsarenik / isohybrid.pl
Created Nov 15, 2015
isohybrid.pl from Syslinux-6.03
View isohybrid.pl
#!/usr/bin/perl
## -----------------------------------------------------------------------
##
## Copyright 2002-2008 H. Peter Anvin - All Rights Reserved
## Copyright 2009 Intel Corporation; author: H. Peter Anvin
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
## Boston MA 02111-1307, USA; either version 2 of the License, or
View pmd.sh
#!/bin/bash
ifthere() {
for cmd in "$@"
do
type ${cmd%% *} >/dev/null 2>&1 && { $cmd || continue; return $?; }
done
}
usage() {
View init
#!/bin/sh
. /etc/tinitrc
HOSTNAME=$(cat /etc/hostname)
DOMAIN=$(cat /etc/dnsdomainname)
FQDN=$HOSTNAME.$DOMAIN
NETCONF=/etc/network/interfaces
IPV4=$(cat $NETCONF | sed -n 's/.*address //p')
IPV6=$(grep "up ifconfig venet0 add" $NETCONF | sed 's/^.*add //')
@jsarenik
jsarenik / rconf.sh
Created Sep 1, 2015
Read file omitting # comments
View rconf.sh
#!/bin/sh
for i in $*
do
grep -v '^#' $i | sed '/^$/d'
done
@jsarenik
jsarenik / keyboard.sh
Created Jun 17, 2015
X Window script to set up keyboard.
View keyboard.sh
#!/bin/sh
setxkbmap ${1:-'dvorak'}
setxkbmap -option ""
xmodmap - <<EOF
! for help, see $ xmodmap -grammar
!in /etc/X11/xorg.conf.d/20-keyboard.conf
! or by running setxkbmap -option "ctrl:nocaps"
@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
@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 / .forward
Created Apr 30, 2015
dotForward file
View .forward
"|IFS=' ' && exec /usr/bin/procmail || exit 75 #jasan"
You can’t perform that action at this time.