Skip to content

Instantly share code, notes, and snippets.

View jeremiahrhall's full-sized avatar

Jeremiah Hall jeremiahrhall

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jeremiahrhall on github.
  • I am jhallopengov (https://keybase.io/jhallopengov) on keybase.
  • I have a public key ASC25NFxhTVhxUuBRp7M-g0J9Rku83h6ia__ArTLqJ6svwo

To claim this, I am signing this object:

@jeremiahrhall
jeremiahrhall / .osx
Created August 14, 2017 16:57 — forked from kharmabum/.osx
mac osx defaults
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@jeremiahrhall
jeremiahrhall / winston-mongodb-with-sails.js
Created October 1, 2014 20:15
Using winston-mongodb with sails as custom logger
var Winston = require('winston'),
_ = require('underscore'),
Connections = require('./connections.js').connections,
DEFAULT_LOG_LEVEL = 'verbose',
NODE_ENV = process.env.NODE_ENV;
require('winston-mongodb');
if (!NODE_ENV) {
NODE_ENV = 'development';

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

@jeremiahrhall
jeremiahrhall / quicksort.swift
Created June 5, 2014 07:37
Functional Recursive Quicksort Algorithm Implementation In Swift
/*
Inspired by Scala's functional quicksort implementation here:
http://www.scala-lang.org/old/node/58.html
*/
func is_greater_than(a: Int) -> (Int) -> Bool {
func compare (b: Int) -> Bool {
if b > a {
return true
}
@jeremiahrhall
jeremiahrhall / orientdb.sh
Created January 26, 2014 21:24
Modified orientdb.sh - Mac su -c issue
#!/bin/sh
# OrientDB init script
# You have to SET the OrientDB installation directory here
ORIENTDB_DIR="YOUR_ORIENTDB_PATH"
ORIENTDB_USER="YOUR_ORIENTDB_USER"
usage() {
echo "Usage: `basename $0`: <start|stop|status>"
@jeremiahrhall
jeremiahrhall / CriteriaFactory.java
Created November 20, 2013 22:55
Testing public gist
if (m.getReturnType() == Integer.TYPE) {
return (changedFile -> {
try {
Function<Integer, Boolean> f = CriteriaFactory.compareInts(two, Integer.valueOf(three));
int num = (int) m.invoke(changedFile);
return f.apply(num);
} catch (Exception e) {
log.error(e.getMessage());
}