Skip to content

Instantly share code, notes, and snippets.

View AndreaCatalucci's full-sized avatar

Andrea Catalucci AndreaCatalucci

  • Tractable
  • London
View GitHub Profile

Cross-compiling a release

If you are using a different Operating System than the machine you are deploying to, the release you are deploying will not work. But exrm lets us set a different erts directory than the one used by the system. First download the latest version of the erlang/otp distribution for the target platform from this link: https://www.erlang-solutions.com/resources/download.html Let's suppose you downloaded PACKAGE in the directory PATH:

cd <PATH>

Depending on whether you downloaded an rpm or a deb, you now need to uncompress it. For rpms, we can use:

#! /usr/bin/env python
import sys
for line in sys.stdin:
data = line.strip().split("\t")
if len(data) != 6:
continue
date, time, store, item, cost, payment = data
print "{0}\t{1}".format(store, cost)
#! /usr/bin/env python
import sys
for line in sys.stdin:
data = line.strip().split("\t")
if len(data) != 6:
continue
date, time, store, item, cost, payment = data
print "{0}\t{1}".format(item, cost)
@AndreaCatalucci
AndreaCatalucci / gist:9227823
Last active August 29, 2015 13:56
reducer.py
import sys
def reducer():
sales_total = 0
old_key = None
for line in sys.stdin:
data = line.strip().split("\t")
if len(data) !=2
continue
import sys
def mapper():
for line in sys.stdin:
data = line.strip().split("\t")
if len(line) != 6:
continue
date, time, store, item, cost, payment = data
print "{{0}\t{1}}".format(store, cost)
# http://www.mono-project.com/Compiling_Mono_on_OSX
require 'formula'
class Mono < Formula
url 'http://download.mono-project.com/sources/mono/mono-3.2.6.tar.bz2'
#sha1 'e2187f80366fcd65c55a1ab946f8d3b39e81be77'
#url 'http://download.mono-project.com/sources/mono/mono-2.10.9.tar.bz2'
#sha1 '1a6e8c5a0c3d88d87982259aa04402e028a283de'