Skip to content

Instantly share code, notes, and snippets.

import { StaggeredMotion, spring } from 'react-motion';
...
<StaggeredMotion
defaultStyles={}
styles={(prevStyles) => {}}
>
{interpolatedStyles => {}}
</StaggeredMotion>
@jomontanari
jomontanari / coaches_mail.txt
Last active October 13, 2015 05:00 — forked from robertpostill/coaches_mail.txt
RG Melbs Coaches Mail
Hi Coaches!
We are so glad to have you on board for Rails Girls this weekend. Here are further details of our schedule for Friday and Saturday, and what to expect. We will also invite you all to our Slack group, so if you have any questions at all please feel free to contact us via email, phone or in Slack.
As with all Ruby Australia events we're bound by the Ruby Australia code of conduct (found at: http://ruby.org.au/code-of-conduct.html), let's hope we don't need it but please do make sure you know who the orgnaisers are and be at least familiar with the document.
The event is at REA, 511 Church Street, Richmond 3121 - you'll see the REA logo on the building. Head to the front door and there will be somebody to let you in - if you can't see anyone, please call Kate (0409 337 107) or Jo (0428 190 881).
We'll kick off around 6pm on Friday, so it would be great if you can make it over to REA by 5:30pm to get set up. We understand that might not be possible for all of you, so we'll try and make sure you ha
@jomontanari
jomontanari / rr_demo
Last active August 29, 2015 13:56
RR stub demo
# encoding: UTF-8
require 'rr'
describe 'Person' do
it 'does not let you stub with RSpec 3' do
person = Object.new
stub(person).full_name { "Jo Cranford" }
end
class WinCombo(position1 : Int, position2 : Int, position3 : Int) {
def isMatch(positions : Array[Int]) : Boolean = {
positions.contains(position1) && positions.contains(position2) && positions.contains(position3)
}
}
class Judge {
val winningCombos = List(
factorial(0, 1).
factorial(X, Y) :-
X > 0,
X1 is X - 1,
factorial(X1, Z),
Y is Z*X.
@jomontanari
jomontanari / gameoflife.dasm16
Created April 24, 2012 10:59
Game of life in Assembly (hardcoded stages)
SET A, 0xE041 ; char live cell
SET C, 0x0000 ; char dead cell
SET B, 0x8000 ; top left corner screen
SET Y, 0 ; iterator for animation
:loop
SET Z, state1
JSR draw
SET Z, state2
JSR draw
@jomontanari
jomontanari / 15-pattern-matching-3.coffee
Created April 23, 2012 02:55
Code snippets for ThoughtWorks Team Hug presentation - comparing JavaScript and CoffeeScript (part 4)
createPoint = (lat, lng) ->
{ lat, lng }
@jomontanari
jomontanari / 10a-for-own-loop.js
Created April 23, 2012 02:51
Code snippets for ThoughtWorks Team Hug presentation - comparing JavaScript and CoffeeScript (part 3)
var objectToString = function (obj) {
var key, val, _results;
_results = [];
for (key in obj) {
if (!obj.hasOwnProperty(key)) continue;
val = obj[key];
if (val !== null) _results.push(key + ":" + val);
}
return _results.join(",");
@jomontanari
jomontanari / 6a-return-from-conditional.js
Created April 23, 2012 02:32
Code snippets for ThoughtWorks Team Hug presentation - comparing JavaScript and CoffeeScript (part 2)
var textColor;
if (result === "failed") {
textColor = "red";
} else if (result === "not run") {
textColor = "yellow";
} else {
textColor = "green";
}
@jomontanari
jomontanari / 1a-object-definition.js
Created April 23, 2012 02:28
Code snippets for ThoughtWorks Team Hug presentation - comparing JavaScript and CoffeeScript (part 1)
var myTeamHugSession = {
title: "CoffeeScript",
time: {
start: "2:30pm",
finish: "3:30pm"
}
};