Skip to content

Instantly share code, notes, and snippets.

View michaelabon's full-sized avatar

Michael Abon (Mike Kenyon) michaelabon

View GitHub Profile
@michaelabon
michaelabon / batcharge.py
Created September 25, 2011 19:50
Battery Metre in zsh
#!/usr/bin/env python
# coding=UTF-8
import math, subprocess
p = subprocess.Popen(["ioreg", "-rc", "AppleSmartBattery"], stdout=subprocess.PIPE)
output = p.communicate()[0]
o_max = [l for l in output.splitlines() if 'MaxCapacity' in l][0]
o_cur = [l for l in output.splitlines() if 'CurrentCapacity' in l][0]
@michaelabon
michaelabon / gist:1248764
Created September 28, 2011 18:22
Map [End] to mean "End of Line" in Mac OS X
{
/* Remap Home / End to be correct :-) */
"\UF729" = "moveToBeginningOfLine:"; /* Home */
"\UF72B" = "moveToEndOfLine:"; /* End */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* Shift + End */
}
@michaelabon
michaelabon / Aspects.txt
Created February 27, 2012 16:59
Aspects
Christopher Head: William Earl:
Mechanized systems,
half-baked ideas,
architect of destruction,
sharpshooter,
mysterious math,
fiery underworld.
Curtis Hodgins:
Combustion Savvy
@michaelabon
michaelabon / map.js
Created July 20, 2012 01:39
Yarns and Bombs
<!-- map.js -->
<!-- javascript function to set up a google map -->
<!-- centered on vancouver city hall -->
var map;
var vanCityHall = new google.maps.LatLng(49.260921, -123.113962);
function init(){
geocoder = new google.maps.Geocoder();
var mapOptions = {
@michaelabon
michaelabon / ets2.ini
Created March 1, 2013 07:37
The settings that I prefer to use in FaceTrackNoIR while playing Euro Truck Simulator 2.
[Tracking]
Smooth=40
invertYaw=false
invertPitch=true
invertRoll=false
invertX=true
invertY=false
invertZ=false
useEWMA=true
redYaw=60
Our server is in peril!
PocketFox, the spirit of OTD, can no longer stand the terrible trolling plaguing our server!
He gives five magic admin slots to five special OTD members!    

From New York, GOOSE! With the power of RAGE!
From Toronto, CARTMAN! With the power of CANDEH!
From Winnipeg, MIKE.KENYON! With the power of 'Sorry'!
From California, ZUKE! With the power of NICENESS!
And from Vancouver, Q.! With the power of SOUND DESIGN!    
@michaelabon
michaelabon / today.md
Last active December 16, 2015 08:58
Accurate summary of today

[13/4/17 09:55:05] Daniel Plemmons: GEAR UP!

[13/4/17 09:56:02] Mike Two Kenyon: Three successful Gear 6 rolls in a row.

[13/4/17 09:58:51] Daniel Plemmons: Though Mike forced my car into a spin and into a barrier on the back half of the track. DNF on the second lap. I'm contesting his win with the race officials.

[13/4/17 10:02:00] Mike Two Kenyon: Two love taps in a row and his car explodes. He needs to tighten up his pacing in turn 3.

[13/4/17 10:02:11] Daniel Plemmons: (rofl)

@michaelabon
michaelabon / Reg
Last active December 21, 2015 18:39 — forked from RandomOutput/Reg
res = re.findall('[a-zA-Z]{2,}\s*\+\+', testString)
if len(res) > 0:
for match in res:
pos_results.append(match.lower())
res = re.findall('\+\+\s*[a-zA-Z]{2,}', testString)
if len(res) > 0:
for match in res:
pos_results.append(match.lower())
@michaelabon
michaelabon / wat.rb
Created September 11, 2013 21:28
Ruby 1.9 lets you use UTF-8 identifiers as legal identifiers.
def     
  * 2
end
    = 5
puts       # => 10
@michaelabon
michaelabon / doge.alias.sh
Created January 10, 2014 00:32
Such alias.
alias very='git checkout'
function such() {
git commit -m "$@"
}
alias wow='git push'
alias ?????='bundle exec cap staging deploy'
alias amaze='bundle exec cap production deploy'
alias doge=alias