Skip to content

Instantly share code, notes, and snippets.

@anderslemke
anderslemke / LoadSequenceController-shouldComponentUpdate.js
Created Jun 14, 2017
The `shouldComponentUpdate` of the LoadSequenceController used on Zetland.
View LoadSequenceController-shouldComponentUpdate.js
shouldComponentUpdate(nextProps, nextState) {
if(window.__server) return true;
this.decideIfWeShouldShow(nextProps, nextState);
if ( nextState.actuallyShowing ) return true;
return false;
}
View sipp-formula
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 Aug 31, 2012
Additions to Translation
View OpenTranslationFile.py
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 Aug 31, 2012
Additions to RSpec Sublime plugin
View OpenRSpecFile.py
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 Apr 27, 2012
A proposal to dynamically add context specific (as in DCI context) validations to individual ActiveModel instances.
View gist:2507303
module ActiveModel
# When you have a module
#
# module Foo
# extend ActiveModel::InjectValidations
#
# inject_validations do |c|
# c.validates_presence_of :price
# end
# end