Skip to content

Instantly share code, notes, and snippets.

Avatar

Jan Owiesniak JanOwiesniak

View GitHub Profile
View gist:1136705
G+ Photography Celebrities (10000+ followers)
.
Thomas Hawk
http://profiles.google.com/104987932455782713675
Trey Ratcliff
http://profiles.google.com/105237212888595777019
View ExpectTwice
require 'minitest/autorun'
class ExpectTwice
def initialize(mock)
@mock = mock
end
def call
p :called_with_FOO => @mock.execute('FOO')
@JanOwiesniak
JanOwiesniak / trade_transfer_calculator.rb
Created Nov 5, 2015
3 different trade transfer calculator implementations
View trade_transfer_calculator.rb
# 1. Old very naive trade transfer calculation implementation
=> used in our current production system
module TransferMarket
module Services
class TradeTransferCalculator
def calculate(size)
size / 2
end
View DefaultTrackableEventHandler.cs
// Enable and reset animator:
var animator = GetComponentsInChildren<Animator>(true);
 foreach (var component in animator)
 component.Play("campfire", -1, 0);
View package-lock.json
{
"name": "MY_APP_NAME",
"version": "2.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
"integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
You can’t perform that action at this time.