Skip to content

Instantly share code, notes, and snippets.

View codatory's full-sized avatar

Alex Conner codatory

View GitHub Profile
# Indiana
#
# For a map of Indiana's time zone regions, see:
# <a href="http://www.mccsc.edu/time.html">
# What time is it in Indiana?
# </a> (2006-03-01)
#
# From Paul Eggert (2007-08-17):
# Since 1970, most of Indiana has been like America/Indiana/Indianapolis,
# with the following exceptions:
@codatory
codatory / XPSetup.md
Last active August 29, 2015 14:03
OSX Format USB Volume for cross-platform usage
dnsmasq --cache-size=5000 --no-daemon --domain-needed --dhcp-range=192.168.0.5,192.168.0.25,5m --dhcp-leasefile=/tmp/dhcp.leases --no-poll --no-hosts --server=8.8.8.8 --server=8.8.4.4 --log-queries --neg-ttl=600 --max-ttl=600 --bind-dynamic --dhcp-option=option:router,192.168.0.1 --dhcp-sequential-ip
Tracing the route to lg.chi2-1.fdcservers.net (192.240.104.4)
VRF info: (vrf in name/id, vrf out name/id)
1 172.20.16.1 0 msec 4 msec 0 msec
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 208.103.3.145 4 msec 16 msec 4 msec
@codatory
codatory / results.txt
Created February 14, 2015 16:44
Bonnie++ on CloudAtCost
Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
debian 4G 552 97 4434 94 6716 2 2118 94 15592 1 323.5 11
Latency 100ms 3973ms 4490ms 28538us 3924ms 3731ms
Version 1.96 ------Sequential Create------ --------Random Create--------
debian -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 10915 50 +++++ +++ 27479 61 17243 43 +++++ +++ 31461 55
Latency 30843us 937us 1072us 39026us 71us 1128us

Keybase proof

I hereby claim:

  • I am codatory on github.
  • I am codatory (https://keybase.io/codatory) on keybase.
  • I have a public key whose fingerprint is FE92 918C 33B4 94FB 2136 3385 B879 11C7 2F78 736F

To claim this, I am signing this object:

#include <Adafruit_NeoPixel.h>
#include <DistanceGP2Y0A21YK.h>
const int numPixels = 8;
const int pixelPin = 6;
const int irPin = 0;
const int sonarPin = 1;
const int minThreshold = 30;
const int maxThreshold = 45;
@codatory
codatory / WeightWatchersCalculatorFn.php
Created April 10, 2009 16:10
PHP Function for calculating weight watcher's point values.
<?php
function calculate ($calories, $fiber, $fat) {
$points_from_fat = $fat / 12;
if ($fiber = 0) {
$fiber_caloric_reduction = 0;
} elseif ($fiber < 4) {
$fiber_caloric_reduction = $fiber * 10;
} elseif ($fiber > 4) {
$fiber_caloric_reduction = 40;
@codatory
codatory / pitoval_import.rake
Created February 5, 2011 19:35
Pivotal Tracker Importer for Redmine
begin
require 'ruport'
rescue LoadError => err
warn "Couldn't load ruport gem: #{err}"
end
namespace :import do
desc 'Import tickets from CSV File'
task :csv => :environment do
@codatory
codatory / bashrc
Created March 7, 2011 17:37
Ubuntu Ruby Development Bootstrapper Script
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
if [[ -n "$PS1" ]]; then
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace