Skip to content

Instantly share code, notes, and snippets.

View jergason's full-sized avatar
🦢
theft puts a parade in my walk

Jamison Dance jergason

🦢
theft puts a parade in my walk
View GitHub Profile
var React = require('react/addons')
var Router = require('react-router')
var TestUtils = React.addons.TestUtils
var state = require('../../state')
var routes = require('../../routes')
var getIntlData = require('../../../../client/app/i18n/data')
var GroupsUsers = require('../../authed')
var root = state.cursor()
{-# LANGUAGE DeriveGeneric #}
data User = User {
id :: String,
email :: String,
hash :: String,
institutionId :: String
} deriving (Show, Generic)
data UserPrintable = UserPrintable {
@jergason
jergason / foo.jsx
Last active August 29, 2015 14:06 — forked from fivetanley/foo.html
/** @jsx: React.DOM */
var React = require('react');
var IfThingy = React.createClass({
render: function() {
var ifThingy;
if (this.props.someVar) {
ifThingy = <h1>Some Var Is {this.props.someVar}</h1>;
}
else {
Ticket = Backbone.Model.extend({
urlRoot: 'api/Ticket/'
});
TicketView = Backbone.View.extend({
initialize: function(model) {
this.model = model;
this.listenTo(this.model, 'change', this.render.bind(this));
this.render()
@jergason
jergason / jasmine.js
Created August 8, 2012 04:37 — forked from fivetanley/jasmine.js
jasmine again
define( [ 'views/SearchView' ], function( SearchView ){
describe('SearchView', function() {
var searchView, spy
beforeEach(function() {
setFixtures( $( "<input type='search' id='search'/>" ) )
searchView = new SearchView()
searchView.render()
spy = jasmine.createSpyObj( 'event', [ 'handler' ] )
})
⨀_⨀
⨂_⨂
(/◔ ◡ ◔)/
°ﺑ°
(¬_¬)
(´・ω・`)
(ʘ_ʘ)
(ʘ‿ʘ)
(๏̯͡๏ )
(◕_◕)
@jergason
jergason / setup_osx.sh
Created March 31, 2012 18:03 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@jergason
jergason / gist:2054227
Created March 17, 2012 01:39
The Zen of R
# I am a scientist who has been using R for about 2 years. Today I achieved a measure of enlightenment into
# the zen of R, and I want to share it with you.
# I was simulating a set of independent random walks, which are formed by a multiplicative process. Here is
# the code I had built up over a few months of working on it and modifying it on and off as research
# questions changed:
TimeSteps <- 1000
Walks <- 100
ErrorMagnitude <- 0.03
@jergason
jergason / videos.js
Created March 13, 2012 18:06 — forked from dedsm/videos.js
Download Coursera videos
(function () {
"use strict";
var curlString = "",
cookieHeader = ' --header \"Cookie:'+ document.cookie + '\" ';
$('li.item_row > a.lecture-link').each(function (index) {
var $lectureLink,
videoLink,
videoName,
subtitleLink,
subtitleName;
@jergason
jergason / new.js
Created February 16, 2012 22:02 — forked from coolaj86/new.js
A pattern (pun intended) - strict, non-strict mode, object.create
// Strict mode and non-strict mode
(function () {
"use strict";
function Foo(a, b, c) {
if (!this instanceof Foo) {
return new Foo(a, b, c);
}
this.a = a;
this.b = b;