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
# mkdir, cd into it | |
mkcd () { | |
mkdir -p -- "$@" && cd "$@" | |
} |
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 | |
LINES=$(tput lines) | |
COLUMNS=$(tput cols) | |
declare -A snowflakes | |
declare -A lastflakes | |
clear |
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
*.sw[po] | |
*.pyc |
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 | |
# Don't allow unset variables | |
set -o nounset | |
# Exit if any command gives an error | |
set -o errexit | |
# Constants | |
LOG_DIR=$HOME/tmp |
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
$ ls | |
bc-1.06-1rt.x86_64.rpm bc-1.06-21.x86_64.rpm | |
bc-1.06-1rt.x86_64.rpm.output bc-1.06-21.x86_64.rpm.output |
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
# source user definitions, only show output if $PS1 set | |
# to add a new one, drop it in ${HOME}/.profile.d/ | |
if [ -d ${HOME}/.profile.d/ ]; then | |
# sourcing *.sh | |
for i in ${HOME}/.profile.d/*.sh ; do | |
if [ -r "$i" ]; then | |
if [ "$PS1" ]; then | |
source $i | |
else | |
source $i &>/dev/null |
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
Chain INPUT (policy DROP 5 packets, 277 bytes) | |
pkts bytes target prot opt in out source destination | |
79 8086 ACCEPT all -- lo any anywhere anywhere | |
464 92474 ACCEPT all -- any any anywhere anywhere state RELATED,ESTABLISHED | |
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ssh state NEW | |
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:domain | |
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:http | |
0 0 ACCEPT icmp -- any any anywhere anywhere icmp echo-request state NEW,RELATED,ESTABLISHED | |
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) |
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
ip=192.168.1.100 sys=laptop ether=001c25123456 | |
dom=laptop.example.com | |
bootf=/386/syslinux/pxelinux.0 |
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/env python3 | |
import os | |
mainpath = 'foo/bar/baz/qux/garple/sux/' | |
def incrementally_joined(parts): | |
full = '' | |
for p in parts: | |
full += p + os.sep | |
yield full |
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
all: html view | |
@echo "Dude!" | |
view: source/foo.html xslt/stylesheet.xslt | |
xsltproc xslt/stylesheet.xslt source/foo.html | less -E | |
sjansen: source/foo.html xslt/sjansen.xslt | |
xsltproc xslt/sjansen.xslt source/foo.html | less -E | |
source/foo.html: source/foo.markdown |