I hereby claim:
- I am plukevdh on github.
- I am plukevdh (https://keybase.io/plukevdh) on keybase.
- I have a public key whose fingerprint is 6123 C2CA ED33 DBC7 9E9F ED4A D7CE 9EB3 8910 3832
To claim this, I am signing this object:
class Processor | |
def plus_two(arg) | |
arg + 2 | |
end | |
end | |
class Runner | |
def block_run(arg, &block) | |
yield arg | |
end |
// same things as ~~ | |
// basically rounds to an integer (when x is a float) | |
// see: http://stackoverflow.com/questions/4055633/what-does-do-in-javascript | |
function doubleTilde(x) { | |
if(x < 0) return Math.ceil(x); | |
else return Math.floor(x); | |
} | |
function range(to, from, step) { | |
// set defaults |
$headers = @{"x-api-key"="$OctopusParameters['NewRelic.APIKey']"} | |
$key = "NewRelic." + $OctopusParameters['Octopus.Project.Name'] + ".ID" | |
$body = @{ | |
"deployment[user]"="$OctopusParameters['Octopus.Deployment.CreatedBy.DisplayName']"; | |
"deployment[revision]"="$OctopusParameters['Octopus.Release.Number']"; | |
"deployment[description]"="$OctopusParameters['Octopus.Release.Notes']"; | |
"deployment[application_id]"="$OctopusParameters[$key]"; | |
} |
2014-02-13T00:25:55Z 1267 TID-9a3e WARN: {:context=>"Sidetiq::Handler#dispatch"} | |
2014-02-13T00:25:55Z 1267 TID-9a3e WARN: unable to create new native thread | |
2014-02-13T00:25:55Z 1267 TID-9a3e WARN: java.lang.Thread.start0(Native Method) | |
java.lang.Thread.start(Thread.java:693) | |
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949) | |
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1371) | |
java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:110) | |
org.jruby.RubyEnumerator$ThreadedNexter.ensureStarted(RubyEnumerator.java:622) | |
org.jruby.RubyEnumerator$ThreadedNexter.next(RubyEnumerator.java:578) | |
org.jruby.RubyEnumerator.next(RubyEnumerator.java:435) |
require 'sinatra' | |
require 'pry' | |
USERNAME = 'BFGIT' | |
SALT = "mytestsalt" | |
def generate_hash(str) | |
Digest::SHA256.new.digest str | |
end |
if RUBY_PLATFORM == 'java' | |
require 'kramdown' | |
TYPE = Kramdown | |
else | |
require 'redcarpet' | |
TYPE = Redcarpet | |
end | |
class MarkdownRenderer | |
def initialize(type=TYPE) |
I hereby claim:
To claim this, I am signing this object:
require 'schemad/extensions' | |
require 'schemad/type_handler' | |
module Schemad | |
class Entity | |
extend Schemad::Extensions | |
def self.inherited(subclass) | |
subclass.instance_variable_set(:@attributes, []) | |
end |
AceEditor = angular.module('AceEditor', []) | |
AceEditor.controller 'EditorCtrl', ['$scope', 'editorSession', ($scope, editorSession) -> | |
$scope.editing = editorSession.editing | |
$scope.editors = editorSession.editors | |
$scope.sanitize = editorSession.sanitize | |
] | |
codeFetchFactory = (editor) -> | |
-> | |
editor.getSession().getDocument().getValue() |
var Storage = (function() { | |
var uniqueId = 0; | |
function Storage() {} | |
Storage.prototype.add = function(item) { | |
var id = this.generateId() | |
, data = this._toJSON(item); | |
localStorage[id] = data; | |
}; |