Skip to content

Instantly share code, notes, and snippets.

View jearle's full-sized avatar

Jesse Earle jearle

View GitHub Profile
[
"CareCloud",
"Kairos",
"Flomio",
"Techstars",
"Home61",
"LiveNinja",
"Clutch Prep",
"OnTrade",
"Nearpod",
/*
Create a function that figures out the distribution of spots per generation
where the children can add only 1 spot based on the number of spots their parent
have. The children must also have at least as many spots as their parent.
*/
var childrenPerGeneration = 3;
function MyInstanceFactory () {
function myFunc () {
}
return {
publicFunc: function () {
/// <reference path="typings/angular2/angular2.d.ts" />
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({
selector: 'my-app'
})
@View({
template: '<h1>Hello {{ name }}</h1><input type="button" value="fuck off" (click)="cM()">'
})
// functional
function createPerson (name, age, eyeColor, height) {
return {
name: name,
age: age,
eyeColor: eyeColor,
tar -zc --exclude wordpress/wp-content/themes/bucket-api/app/node_modules/ wordpress/wp-content/themes/bucket-api | ssh root@littlebigberry.com "cat > ~/file.tar.gz && tar -zxvf file.tar.gz && rm -rf /var/www/wp-content/themes/bucket-api/ && cp -r ~/wordpress/wp-content/themes/bucket-api/ /var/www/wp-content/themes/bucket-api/ && rm -rf file.tar.gz && rm -rf wordpress/"
@jearle
jearle / gist:6bfe6153a2e36139ef5c
Last active August 29, 2015 14:17
SetInterval Implmentation
// using the setTimeout implementation https://gist.github.com/jearle/6bfe6153a2e36139ef5c
public func setInterval(#seconds: Double, callback: CancelFunc) -> EmptyFunc {
return setTimeout(seconds: seconds) {
callback(setInterval(seconds: seconds, callback))
}
@jearle
jearle / gist:1f29848b1c09e7548bf3
Created February 22, 2015 06:15
Brocfile.js to babel transpile and browserify your ES6 code.
var pickFiles = require('broccoli-static-compiler');
var fastBrowserify = require('broccoli-fast-browserify');
var babelTranspiler = require('broccoli-babel-transpiler');
var mergeTrees = require('broccoli-merge-trees');
var libTree = pickFiles('lib', {
files: ['**/*.js'],
@jearle
jearle / gist:b9a32dd48180cbcaf2f6
Created February 17, 2015 22:39
Get all Objective-C classes containing a matching string in the class name
#import <objc/runtime.h>
#import <objc/message.h>
Class* getClassesFromClassList () {
int numClasses = objc_getClassList(nil, 0);
Class *classes = (__unsafe_unretained Class *)malloc(sizeof(Class) * numClasses);
return classes;