I hereby claim:
- I am james-firth on github.
- I am jamesfirth (https://keybase.io/jamesfirth) on keybase.
- I have a public key whose fingerprint is 2598 E5AD E3EB 0C48 0731 96B0 2844 086A 557B 9B3F
To claim this, I am signing this object:
############################################################################################# | |
# The MIT License (MIT) | |
# Copyright (c) 2014 James Firth | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
I hereby claim:
To claim this, I am signing this object:
"3ga", | |
"aac", | |
"aif", | |
"aiff", | |
"amr", | |
"au", | |
"aup", | |
"caf", | |
"flac", | |
"gsm", |
# /bin/sh | |
if [[ $EUID -ne 0 ]]; then | |
echo 'This script must be run as "root".' | |
echo 'Enter password to elevate privileges:' | |
SCRIPTPATH=$( cd $(dirname $0) ; pwd -P ) | |
SELF=`basename $0` | |
sudo $SCRIPTPATH'/'$SELF | |
exit 1 | |
fi |
File Format CSVs - A quick list of common file types to make file parsing easier. Comma and newline delimited for easier human parsing. Still working on adding more data. Data initiailly seeded with data from online-convert.com
Currently copying files from my other gist. WIP.
private static void createArmy(ArrayList <Enemy> enemies, int numberOfEnemies) | |
{ | |
for (int i = 0; i < numberOfEnemies; i++) | |
{ | |
enemies.add(new Elf()); | |
enemies.add(new GreaterElf()); | |
} | |
} | |
private static boolean fight(Player me, ArrayList<Enemy> army) |
import os | |
import time | |
import random | |
## Variables ## | |
filename = "crossword_wordlist.txt" #file to load | |
path = os.path.abspath(os.curdir) #path to said file | |
output_filepath = path+"/offline_password_encryption_key.txt" |
D/StatusBar.NetworkController( 914): dumpIcon[(gone) stat_sys_5signal_2|null stat_sys_wifi_signal_in_4 (gone) F] | |
W/RecipientPreferenceDatabase(31082): Muted until: 0 | |
W/PhoneNumberFormatter(31082): Got local CC: CA | |
W/TextSecureSessionStore(31082): No existing session information found. | |
W/RecipientPreferenceDatabase(31082): Muted until: 0 |
#!/bin/sh | |
cd /path/to/local/cvs/repo/ | |
output="$(cvs -qn update)" | |
echo $output | |
if [ -x "$output"] | |
then | |
echo "No Updates." | |
else | |
echo "New commit available!" | |
echo "Updating..." |
import os | |
import sys | |
import tempfile | |
import win32file | |
from glob import glob | |
def get_link_count(filename): | |
if os.path.isdir(filename): | |
dwFlagsAndAttributes = win32file.FILE_FLAG_BACKUP_SEMANTICS | |
else: |