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
#my_table td { | |
font-weight: bold; | |
} |
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/awk -f | |
{ | |
printf "private %s %s;\n", $1, $2; | |
cap = sprintf("%s%s", toupper(substr($2, 1, 1)), substr($2, 2)); | |
get[NR] = sprintf("public %s get%s() {\n\treturn %s;\n}", $1, cap, $2); | |
set[NR] = sprintf("public void set%s(final %s %s) {\n\tthis.%s = %s;\n}", cap, $1, $2, $2, $2); | |
} |
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 | |
[[ $# -lt 1 ]] && | |
B=8 || | |
B=$1 | |
dd if=/dev/urandom bs=1 count="$B" 2>/dev/null | | |
od -A n -t d"$B" | | |
sed 's/^[[:space:]]*//' |
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 | |
cmd='synclient TouchpadOff=' | |
[[ $( | |
synclient | | |
grep '^\s*TouchpadOff' | | |
awk '{print $3}' | |
) == 0 ]] && | |
${cmd}1 || |
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/python | |
import re | |
import sys | |
argc = len(sys.argv) | |
ifd = sys.stdin if argc <= 1 else open(sys.argv[1]) | |
ofd = sys.stdout if argc <= 2 else open(sys.argv[2], mode="w") | |
lnum = 10 |
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
fpipe () { | |
local tmpfile=`mktemp` | |
cat >$tmpfile | |
$@ $tmpfile | |
rm $tmpfile | |
} |
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 | |
for pkg in `pacman -Qq`; do | |
size=` | |
pacman -Qi $pkg | | |
grep '^Installed Size' | | |
awk -F '[[:space:]]+:[[:space:]]+' '{print $2}' | |
` | |
echo "$size - $pkg" | |
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/bash | |
branches=$( | |
git branch --contains ` | |
git rev-list $1..$2 | | |
tail -n 1 | |
` | | |
sed 's/^..//' | |
) |
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
import types | |
from django.core import exceptions | |
def auto_error_class(field, error_class="error"): | |
inner_clean = field.clean | |
def wrap_clean(self, *args, **kwargs): | |
try: |
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 | |
# List Arch Linux packages recently added to the system | |
# | |
# Usage: | |
# | |
# pacweek [<since>] | |
# | |
# Default interval is 1 week ago. | |
# |
OlderNewer