Skip to content

Instantly share code, notes, and snippets.

View zonpantli's full-sized avatar

Miika Pihlaja zonpantli

View GitHub Profile
@zonpantli
zonpantli / linksim.rb
Last active December 18, 2015 02:49
Simulate various network links. Useful e.g. for mobile development on localhost.
# Usage
#
# To simulate lossy 3G on local connections to and from port 3004
# ruby linksim.rb up 3004 3g_lossy
#
# To clear ipfw rules
# ruby linksim down
conf = {
:"3g_lossy" => {
@zonpantli
zonpantli / brew doctor
Created September 13, 2012 19:35
homebrew autoconf issue
mepihlaj@holobrook:~ $ brew doctor
Your system is raring to brew.
require 'net/http'
require 'faraday'
require 'em-http-request'
require 'httpclient'
class HttpRunner
def self.run(client)
case client.to_i
(ns gist.globhfs
(:import [cascading.tap GlobHfs]))
;; ### Bucket to Cluster
;;
;;; To get tuples back out of our directory structure on S3, we employ
;; Cascading's [GlobHFS] (http://goo.gl/1Vwdo) tap, along with an
;; interface tailored for datasets stored in the MODIS sinusoidal
;; projection. For details on the globbing syntax, see
;; [here](http://goo.gl/uIEzu).
@zonpantli
zonpantli / j.md
Created October 13, 2011 15:06
Titanium Jussi
@zonpantli
zonpantli / trace.md
Created September 1, 2011 19:02
ukko hadoop trace

masters ukko049

slaves ukko049 ukko050

Use hostname ukko049 in config

@zonpantli
zonpantli / siili.md
Created August 31, 2011 08:47
Siili Demo
@zonpantli
zonpantli / about.md
Created August 12, 2011 19:54 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@zonpantli
zonpantli / gist:996772
Created May 28, 2011 10:24
Convert bunch of bmps to one pdf
mogrify -format pdf *bmp | gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=merged.pdf *pdf
@zonpantli
zonpantli / gist:990754
Created May 25, 2011 10:36
User email model example BAD
class User < ActiveRecord::Base
belongs_to :user_email
end
class UserEmail < ActiveRecord::Base
has_one :user
end
# nyt tuohon emailiin voitaisiin sitten viitata seuraavasti