Instantly share code, notes, and snippets.

View jsx.js
import { StaggeredMotion, spring } from 'react-motion';
...
<StaggeredMotion
defaultStyles={}
styles={(prevStyles) => {}}
>
{interpolatedStyles => {}}
</StaggeredMotion>
View coaches_mail.txt
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
View rr_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
View 1-tictactoe-attempt-1.scala
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(
View 1_factorial.pl
factorial(0, 1).
factorial(X, Y) :-
X > 0,
X1 is X - 1,
factorial(X1, Z),
Y is Z*X.
View gameoflife.dasm16
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
View 15-pattern-matching-3.coffee
createPoint = (lat, lng) ->
{ lat, lng }
View 10a-for-own-loop.js
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(",");
View 6a-return-from-conditional.js
var textColor;
if (result === "failed") {
textColor = "red";
} else if (result === "not run") {
textColor = "yellow";
} else {
textColor = "green";
}
View 1a-object-definition.js
var myTeamHugSession = {
title: "CoffeeScript",
time: {
start: "2:30pm",
finish: "3:30pm"
}
};