Skip to content

Instantly share code, notes, and snippets.

# assuming you have Joyent Compute Service available
sdc-createmachine --dataset b83f8276-1fdd-11e3-989b-4bddb088a8a0 --package g3-standard-0.625-smartos --name alain-demo-$(uuid) | json -a id
#!/bin/sh
inPreprocessorMode () {
hasE=0
hasU=0
hasT=0
for arg in "$@"
do
if [ 'x-E' = "x$arg" ]; then hasE=1; fi
if [ 'x-undef' = "x$arg" ]; then hasU=1; fi

Install Graphite

pkgin up
pkgin in py27-graphite-web ap22-py27-wsgi

Configure Graphite

Update /opt/local/etc/graphite/carbon.conf

dataset=$(zfs list | grep data | awk '{print $1}')
sudo zfs set mountpoint=/data $dataset
sudo groupadd graphite
sudo useradd -c "Graphite User" -m -d /data/graphite -g graphite -s /bin/bash graphite
sudo pkgin up
sudo pkgin -y ug
sudo pkgin -y in gcc47
sudo pkgin -y in openldap-client
@timothyklim
timothyklim / USAGE.md
Last active August 29, 2015 14:00 — forked from henrik/USAGE.md

Read this rbenv/ruby-build#550 if you're trying to install patch on Mac OS X 10.9 with homebrew

rbenv install -f --patch 2.1.1 < <(curl -sSL https://gist.githubusercontent.com/TimothyKlim/11043852/raw/fe228cf0524873c992fa5c31b1173537dca76a2c/patch.diff)

Open the postgresql.conf config file:

$> mate /usr/local/var/postgres/postgresql.conf

Uncomment the line with 'log_destination' and set it to 'syslog'

log_destination = 'syslog'

Open the syslog config:

/**
* <b>Fixed Point Combinator is:</b>
* Y = λf.(λx.f (x x)) (λx.f (x x))
*
* <b>Proof of correctness:</b>
* Y g = (λf . (λx . f (x x)) (λx . f (x x))) g (by definition of Y)
* = (λx . g (x x)) (λx . g (x x)) (β-reduction of λf: applied main function to g)
* = (λy . g (y y)) (λx . g (x x)) (α-conversion: renamed bound variable)
* = g ((λx . g (x x)) (λx . g (x x))) (β-reduction of λy: applied left function to right function)
* = g (Y g) (by second equality) [1]

I like Learn You a Haskell as a reference and cheat-sheet but I found it a little slow for learning Haskell.

Here's my recommended order for just learning Haskell:

http://www.seas.upenn.edu/~cis194/lectures.html Brent Yorgey's course is the best I've found so far and replaces both Yann Esposito's HF&H and the NICTA course. This course is particularly valuable as it will not only equip you to write Haskell but also help you understand parser combinators.

Real World Haskell is available online. (Thanks bos!)

I recommend RWH as a reference (thick book). The chapters for parsing and monads are great for getting a sense for where monads are useful. Other people have said that they've liked it a lot. Perhaps a good follow-up for practical idioms after you've got the essentials of Haskell down?

module Test
import Provider
import Database
import Queries
%language TypeProviders
%link C "sqlite3api.o"
(() => {
final class $anon extends org.apache.spark.sql.catalyst.expressions.MutableProjection {
def <init>() = {
super.<init>();
()
};
private[this] var mutableRow: org.apache.spark.sql.catalyst.expressions.MutableRow = new org.apache.spark.sql.catalyst.expressions.GenericMutableRow(1);
def target(row: org.apache.spark.sql.catalyst.expressions.MutableRow): org.apache.spark.sql.catalyst.expressions.MutableProjection = {
mutableRow = row;
this