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:
I hereby claim:
To claim this, I am signing this object:
#!/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 & |
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'; |
(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.
/* | |
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 | |
} |
#!/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>" |
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()); | |
} |