Skip to content

Instantly share code, notes, and snippets.

View edunham's full-sized avatar

E. Dunham edunham

View GitHub Profile
autoHunt = setInterval(function() {
var catpower = gamePage.resPool.get('manpower');
if (catpower.value / catpower.maxValue > 0.5) {
$("a:contains('Send hunters')").click();
if (gamePage.workshop.getCraft('parchment').unlocked) { gamePage.craftAll('parchment'); }
if (gamePage.workshop.getCraft('manuscript').unlocked) { gamePage.craftAll('manuscript'); }
if (gamePage.workshop.getCraft('compedium').unlocked) { gamePage.craftAll('compedium'); }
if (gamePage.workshop.getCraft('blueprint').unlocked) { gamePage.craftAll('blueprint'); }
}
}, 5 * 1000);
autoHunt = setInterval(function() {
var catpower = gamePage.resPool.get('manpower');
if (catpower.value / catpower.maxValue > 0.95) {
$("a:contains('Send hunters')").click();
if (gamePage.workshop.getCraft('parchment').unlocked) { gamePage.craftAll('parchment'); }
if (gamePage.workshop.getCraft('manuscript').unlocked) { gamePage.craftAll('manuscript'); }
}
}, 5 * 1000);
autoCatnip = setInterval(function() {
# yaourtrc - Configuration for yaourt
#
# See yaourtrc(5) for more information
#
#
# General
#AUTOSAVEBACKUPFILE=0
#DEVELBUILDDIR="/var/abs/local/yaourtbuild"
#DEVEL=0
% template created by: Russell Haering. arr. Joseph Crop
\documentclass[12pt,letterpaper]{article}
\usepackage{anysize}
\marginsize{2cm}{2cm}{1cm}{1cm}
\begin{document}
\begin{titlepage}
\vspace*{4cm}
\begin{flushright}
1. You will need to familiarize yourself with the C functions used to
communicate with the I2C device. Look at the following functions in the Linux
source file i2c-dev.h and describe what each one does.
a. i2c_smbus_read_byte(int file)
returns 1 byte of the file, or -1 if it couldn't access it
b. i2c_smbus_write_byte(int file, __u8 value)
#! /bin/bash
rm -f draft1.html;
cat pre.html >> draft1.html;
for f in {01..27};
do
echo "</pre><a name=\"$f\">" >> draft1.html;
echo "<h1>Chapter $f</h1></a><pre>" >> draft1.html;
#! /usr/bin/env python
import sys
import os
import datetime
from subprocess import check_output
def count():
files = os.listdir('.')
count = 0
@edunham
edunham / hello.py
Last active August 29, 2015 14:07
A hello world that uses getopt
#!/usr/bin/env python
import getopt
import sys
try:
opts, args = getopt.getopt(sys.argv[1:], "g:s:", ["given=", "surname="])
except getopt.GetoptError as err:
print str(err) # will print something like "option -a not recognized"
sys.exit(2)
@edunham
edunham / gist:88a14a8784f331a8c190
Last active August 29, 2015 14:06
neat things
http://dillinger.io/
https://github.com/mongolsamurai/whiskeybot
https://www.vultr.com/register/
http://www.steverrobbins.com/nlpschedule/books.html (nlp reading list)
http://bezier.method.ac/# game where you learn to use the bezier pen
https://github.com/GitbookIO/gitbook Utility for generating books and exercises using GitHub/Git and Markdown
http://imgur.com/gallery/bCiPTU5 how to read Russian, a bit
http://mathyawp.blogspot.com/2013/01/the-lesson-of-grace-in-teaching.html
http://www.mouseless.de/
http://bigtextbox.com/
def bottles(n):
var foo := ""
switch (n) {
match == 0 { foo += "No bottles" }
match == 1 { foo += "1 bottle" }
#match < 3 { foo += "not many"}
match _ { foo += `$n bottles` }
}
return foo