Skip to content

Instantly share code, notes, and snippets.

Jared Forsyth jaredly

Block or report user

Report or block jaredly

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:a5e0102c060b7a1b40525d41f87843a8
let module Styled = {
let module Create (Config: {
let name: string;
let style:;
}) => {
let component = ReasonReact.statelessComponent;
let make ::paddingVertical=? => {
let style = combineStylesSomeHow paddingVertical; /* <- this is an optional btw */
View.make ::style
/* Template for proposals to update the syntax. Base template: */
let a = 10;
let b = 20;
/* A */
let nonNamed = (a, b) => a + b;
type nonNamed = (int, int) => int;
View index.html
<div id="root"></div>
const log = txt => {
const div = document.createElement('div')
View reboost
#!/usr/bin/env python
# Toss this in your ~/bin/ as ~/bin/reboost and `chmod +x ~/bin/reboost`
reboost [cmd]
first - follow upstream until just before master
last - follow downstreams all the way
up - go to parent
jaredly /
Last active Sep 22, 2016
Git Tree commands

Here's part of my ~/

	name = Jared Forsyth
    # View the tree!
    tree = log --oneline --decorate --all --graph
    tr = log --oneline --decorate --all --graph
    t = log --color --date-order --graph --oneline --decorate --simplify-by-decoration --branches
View resultUtils.swift
import * from PackTypes.Result
let module P = PackTypes.Parsing
let rec getChild = (children, mapper) => switch children {
case []: None
case [child]: switch mapper(child) {
case None: getChild(rest, mapper)
case x: x
let rec getChildren = (children, mapper) => switch children {
type something = | Something 'a :something;
module type ChildType = {let makeSomething: int => something;};
let module MakeThing (ChildA: ChildType) (ChildB: ChildType) => {
type childArg = | A int | B int;
let doThing arg =>
switch arg {
| A n => ChildA.makeSomething 10
| B n => ChildB.makeSomething 5
View ReactNativeComponent.swift
public class ReactNativeComponent: UIViewController {
let callbacks: [Int]
let properties: [String: AnyObject]
let name: String
init(name: String, properties: [String: AnyObject], callbacks: [Int]) { = name = properties
self.callbacks = callbacks
View codemirror.cljs
(defn code-mirror
"Create a code-mirror editor. The parameters:
value-atom (reagent atom)
when this changes, the editor will update to reflect it.
:style (reagent style map)
will be applied to the container element
options passed into the CodeMirror constructor
:on-cm-init (fn [cm] -> nil)
View Document.nm
"title": "Demobox",
"created": 1432725699439,
"opened": 1433371827400,
"repl": "null",
"root": {
"id": "bglg05h4fvzbftq2vnwpv3t1lbbb9pjm",
"created": 1432725699462,
"modified": 1432725699462,
"content": "Demobox",
You can’t perform that action at this time.