Skip to content

Instantly share code, notes, and snippets.

View jedahan's full-sized avatar
💀
.

Jonathan Dahan jedahan

💀
.
View GitHub Profile
foreach line
if line.contains("Game reset started")
endtime = line.column(4) + 00:02
marines = {}
aliens = {}
foreach line
if line.column(4) >= endtime
break
id = line.extract(STEAM_?:?:*>)
# Copyright 2010 Jonathan Dahan <jedahan@gmail.com>
# Distributed under the terms of the ISC license ( http://en.wikipedia.org/wiki/ISC_license )
require 'csv'
require 'pp'
# Dumb team class
class Team
attr_accessor :players, :score
def initialize( players = [], score = 0.00 )
@jedahan
jedahan / live-command-coloring.sh
Created December 24, 2010 11:56 — forked from paradoxxxzero/live-command-coloring.sh
fish-style syntax highlighting for zsh
#!/bin/zsh
# Copyleft 2010 paradoxxxzero All wrongs reserved
# With contribution from James Ahlborn
# https://gist.github.com/752727
# Fork of https://gist.github.com/586698 by nicoulaj / dingram / roylzuo ...
# From http://www.zsh.org/mla/users/2010/msg00692.html
# Token types styles.
# See http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#SEC135
@jedahan
jedahan / WWDC_2011.taskpaper
Created June 6, 2011 19:03
WWDC 2011 Summary of OSX, iOS, and iCloud
Highlights:
Lion:
- all documents auto-save and are versioned
- all applications save and resume state
- greatly improved window management
- $29 only on the app store (July)
iOS:
- reminders
- sharing items via twitter and iMessage
- notifications (android)
config = JSON.parse require('fs').readFileSync './config.json', 'utf8'
zappa 80, {config}, ->
@config = config
get '/': ->
render 'index'
zappa 33, {config}, ->
helper fakeData: ->
include 'faker.coffee'
config = JSON.parse require('fs').readFileSync 'config.json'
zappa 80, {@config}, ->
get '/': ->
render 'index'
@jedahan
jedahan / gist:1262187
Created October 4, 2011 17:02
git rebase
☁ bugswarm-developers [master] vim package.json
☁ bugswarm-developers [master] ⚡ git add package.json
☁ bugswarm-developers [master] ⚡ git commit -m 'explicitly add new files'
[master b3a9612] explicitly add new files
1 files changed, 1 insertions(+), 1 deletions(-)
☁ bugswarm-developers [master] git push
To git@github.com:buglabs/bugswarm-developers.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:buglabs/bugswarm-developers.git'
To prevent you from losing history, non-fast-forward updates were rejected

HNTR

hntr is a realtime collaborative hunting list that helps you prepare for the oncoming winter.

Let's say Prometheus and Bob have a shopping list for their brand new cave. They both hunt in different jungles, and have a common set of supplies needed for the winter:

  • impala meat
  • flint
From 279c5baab785d3ec00e5c5bc1d42d16e6b137ba1 Mon Sep 17 00:00:00 2001
From: Jonathan Dahan <jonathan@jedahan.com>
Date: Tue, 18 Oct 2011 14:18:33 -0400
Subject: [PATCH] update install docs to use .xz format
---
install-guide.mkd | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/install-guide.mkd b/install-guide.mkd
@jedahan
jedahan / gist:1337420
Created November 3, 2011 18:51
notswarmduino
#include <SPI.h>
#include <Ethernet.h>
byte mac[6] = { 0xAA, 0xAD, 0xBE, 0xFF, 0xFF, 0xED };
byte ip[4] = { 192,168,0,9 };
byte dns[4] = { 8,8,8,8 };
byte gw[4] = { 192,168,0,3 };
byte subnet[4] = { 255,255,0,0 };
const IPAddress server(107,20,250,52); // api.bugswarm.net