This file contains 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
#include <stdio.h> | |
unsigned int reverse(unsigned char b) { | |
b = (b & 0xF0) >> 4 | (b & 0x0F) << 4; | |
b = (b & 0xCC) >> 2 | (b & 0x33) << 2; | |
b = (b & 0xAA) >> 1 | (b & 0x55) << 1; | |
return b; | |
} | |
int |
This file contains 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 | |
CHROOT=${1:-"myroot"} | |
ARCH=${2:-"armv5l"} | |
test -n "$UNSHARE" || { | |
export UNSHARE="unshare --fork --pid --mount" | |
exec $UNSHARE $0 $CHROOT | |
} |
This file contains 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 | |
# | |
# 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:[email protected]/nic/update?hostname=$TID" |
This file contains 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 | |
git branch --merged | grep -v "^\*\|master" | xargs -r -n 1 git branch -d |
This file contains 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 | |
## ----------------------------------------------------------------------- | |
## | |
## 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 |
This file contains 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 | |
ifthere() { | |
for cmd in "$@" | |
do | |
type ${cmd%% *} >/dev/null 2>&1 && { $cmd || continue; return $?; } | |
done | |
} | |
usage() { |
This file contains 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 | |
. /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 //') |
This file contains 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 | |
for i in $* | |
do | |
grep -v '^#' $i | sed '/^$/d' | |
done |
This file contains 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 | |
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" |