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 | |
function getpass() { | |
if [[ -f $HOME/.passwd.cpt ]]; then | |
password=$(ccrypt -c $HOME/.passwd.cpt | egrep $1 | cut -f 3 -d ":") | |
else | |
password=$(egrep $1 $HOME/.passwd | cut -f 3 -d ":") | |
fi | |
if [[ $password == "" ]]; then |
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
$ cat .pypirc | sed -e "s/password\: .*/password: xxxx/g" | |
[server-login] | |
repository: https://pypi.python.org/pypi | |
username: prologic | |
password: xxxx | |
[testpypi] | |
repository: http://testpypi.python.org/pypi | |
username: prologic | |
password: xxxx |
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
# ... | |
name=foo | |
version=1.0 | |
source=(...) | |
build() { | |
OLD_SRC = $SRC | |
make | |
SRC = $OLD_SRC |
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
prologic@daisy | |
Fri Feb 13 18:35:23 | |
~/contrib/docker-machine | |
$ fakeroot pkgmk -d | |
=======> Building '/data/packages/docker-machine#0.1.0-rc3-1.pkg.tar.gz'. | |
bsdtar -p -o -C /home/prologic/contrib/docker-machine/work/src -xf /data/sources/machine-0.1.0-rc3.tar.gz | |
+ build | |
+ export GOPATH=/home/prologic/contrib/docker-machine/work/src/src | |
+ GOPATH=/home/prologic/contrib/docker-machine/work/src/src | |
+ cd machine-0.1.0-rc3 |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "hashicorp/precise64" | |
config.vm.network "public_network" |
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
# diff -u <(zcat /proc/config.gz ) <(cat .config) | |
--- /dev/fd/63 2015-02-11 14:45:39.309910447 +1000 | |
+++ /dev/fd/62 2015-02-11 14:45:39.309910447 +1000 | |
@@ -132,16 +132,17 @@ | |
CONFIG_ARCH_WANTS_PROT_NUMA_PROT_NONE=y | |
CONFIG_CGROUPS=y | |
# CONFIG_CGROUP_DEBUG is not set | |
-# CONFIG_CGROUP_FREEZER is not set | |
+CONFIG_CGROUP_FREEZER=y | |
CONFIG_CGROUP_DEVICE=y |
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 | |
# Tool: fix-codebase.sh | |
# Author: James Mills, prologic at shortcircuit dot net dot au | |
# Date: 09 February 2015 | |
# Fix a Python codebase that may contain several common issues: | |
# - PEP8 violations | |
# - Tabs instead of spaces | |
# - CRLF (Windows) style line endings instead of LF (UNix) style line endings |
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 | |
# Tool: fix-codebase.sh | |
# Author: James Mills, prologic at shortcircuit dot net dot au | |
# Date: 09 February 2015 | |
# Fix a Python codebase that may contain several common issues: | |
# - PEP8 violations | |
# - Tabs instead of spaces | |
# - CRLF (Windows) style line endings instead of LF (UNix) style line endings |
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
(django-upgrade)➜ ~ diff -u django-template-parser-1.2.py django-template-parser-1.4.py | |
--- django-template-parser-1.2.py 2015-01-29 15:04:34.579306331 +1000 | |
+++ django-template-parser-1.4.py 2015-01-29 15:03:43.918306352 +1000 | |
@@ -7,28 +7,32 @@ | |
self.add_library(lib) | |
def parse(self, parse_until=None): | |
- if parse_until is None: parse_until = [] | |
+ if parse_until is None: | |
+ parse_until = [] |
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
# setup-chroot | |
bash-4.3# blkid | |
/dev/sr0: UUID="2015-01-15-04-07-33-00" LABEL="CRUX-3.1-updated" TYPE="iso9660" PTUUID="675ad9ef" PTTYPE="dos" | |
/dev/sda1: UUID="c85e110e-2f37-4a63-9124-bcecc494b628" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="00005501-01" | |
/dev/sdf1: UUID="8503f5d8-d5b3-4d06-8679-ee5ad2008c95" TYPE="ext4" PARTUUID="ca70eb3a-01" | |
bash-4.3# mv /boot/menu.lst /boot/grub.cfg | |
bash-4.3# cat /boot/grub.cfg | |
search --no-floppy --fs-uuid --set=root 8503f5d8-d5b3-4d06-8679-ee5ad2008c95 | |
terminal_output gfxterm |