Skip to content

Instantly share code, notes, and snippets.

View anderslemke's full-sized avatar

Anders Lemke-Holstein anderslemke

View GitHub Profile
@anderslemke
anderslemke / LoadSequenceController-shouldComponentUpdate.js
Created June 14, 2017 10:47
The `shouldComponentUpdate` of the LoadSequenceController used on Zetland.
shouldComponentUpdate(nextProps, nextState) {
if(window.__server) return true;
this.decideIfWeShouldShow(nextProps, nextState);
if ( nextState.actuallyShowing ) return true;
return false;
}
require 'formula'
class Sipp < Formula
homepage 'http://sipp.sourceforge.net/'
url 'http://downloads.sourceforge.net/project/sipp/sipp/3.4/sipp-3.3.990.tar.gz'
sha1 'b2637cb72556595253bbdd4a68cc974c9ac1d92e'
def install
system "./configure", "--with-pcap"
system "make", "DESTDIR=#{prefix}"
bin.install "sipp"
@anderslemke
anderslemke / OpenTranslationFile.py
Created August 31, 2012 14:40
Additions to Translation
import sublime
import sublime_plugin
import re, inspect, os
import shared
class OpenTranslationFileCommand(sublime_plugin.WindowCommand):
def run(self):
if not self.window.active_view():
return
@anderslemke
anderslemke / OpenRSpecFile.py
Created August 31, 2012 14:38
Additions to RSpec Sublime plugin
import sublime
import sublime_plugin
import re, inspect, os
import shared
class OpenRspecFileCommand(sublime_plugin.WindowCommand):
def run(self):
if not self.window.active_view():
return
@anderslemke
anderslemke / gist:2507303
Created April 27, 2012 08:07
A proposal to dynamically add context specific (as in DCI context) validations to individual ActiveModel instances.
module ActiveModel
# When you have a module
#
# module Foo
# extend ActiveModel::InjectValidations
#
# inject_validations do |c|
# c.validates_presence_of :price
# end
# end