Skip to content

Instantly share code, notes, and snippets.

View JNRowe's full-sized avatar

James Rowe JNRowe

View GitHub Profile
debug
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/three"
noipdefault
usepeerdns
/dev/ttyUSB0
defaultroute
persist
crtscts
lcp-echo-failure 0
TIMEOUT 3
ECHO ON
ABORT 'BUSY'
ABORT 'DELAYED'
ABORT 'ERROR'
ABORT 'NO ANSWER'
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT 'VOICE'
'' \rAT
mkdir e220_drivers; cd e220_drivers
mount -t vfat /dev/sr2 /mnt/huawei
for file in $(find *.cab); do unpack $file; done
au InsertEnter * !echo "notify.start('Insert mode started')" | awesome-client
au InsertLeave * !echo "notify.stop('Insert mode finished')" | awesome-client
if &term =~? '^rxvt' && exists('&t_EI')
let &t_EI="\033]12;red\007"
let &t_SI="\033]12;green\007"
endif
#! /usr/bin/ruby
require "webrick"
server = WEBrick::HTTPServer.new(
:BindAddress => "localhost",
:Port => 8080,
:DocumentRoot => ARGV[0]
)
http_serve()
{
if [ "${1}" = "--help" ]
then
echo "Usage: ${FUNCNAME} [location]"
echo "Start a httpd in \`location', defaulting to \`${http_serve_location}'."
return 1
fi
busybox httpd -f -p 8080 -h ${1:-${http_serve_location}}
}
GENERATED = $(patsubst %.rst, %.html, $(wildcard *.rst))
all: $(GENERATED)
$(GENERATED): %.html: %.rst
rst2html.py $< $@
CTAGS := exuberant-ctags
TARGETS := $(patsubst /usr/lib/%, tags/%.ctags, $(wildcard /usr/lib/python*)) \
doc/tags
all: $(TARGETS)
tags/%.ctags: /usr/lib/%
$(CTAGS) --exclude=test_* --exclude=tests.py --exclude=test.py \
PRIVATE_FILES := .abook/addressbook .gnupg/secring.gpg .mailfilter .msmtprc \
.ssh/id_rsa
PRIVATE_DIRS := .gnupg
fix-perms: $(PRIVATE_FILES) $(PRIVATE_DIRS)
$(info - Removing extra read permissions from private files and directories)
chmod 600 $(PRIVATE_FILES)
chmod 700 $(PRIVATE_DIRS)