Skip to content

Instantly share code, notes, and snippets.

@Zabrane
Zabrane / rebar.md
Created July 22, 2013 02:30 — forked from dch/rebar.md

Pre-requisites

  • install MSYSGIT and add <gitdir>/bin/cmd to path
  • install Erlang/OTP minimum R15B02 (fixes escript swallowing stdout on exit, and adds line numbers to errors)
  • add Erlang/OTP to path

get fresh rebar

git clone git://github.com/basho/rebar.git

cd rebar

% FontAwesome (http://fortawesome.github.com/Font-Awesome/) bindings for (Xe)LaTeX
% Author: Honza Ustohal <honza@egoistic.biz>
%
% Translation of FontAwesome's private range characters into XeTeX symbols. All icons are camel-cased and prefixed with 'fa', i.e. what was .icon-align-center the CSS version of FontAwesome becomes \faAlignCenter
% This might be reworked into a full blown package in the near future
%
% Prerequisite:
% XeLaTeX, FontAwesome installed as a system font accessible by XeLaTeX
%
% Usage:
%%%-------------------------------------------------------------------
%%% @author <andelf@gmail.com>
%%% @copyright (C) 2013,
%%% @doc
%%%
%%% @end
%%% Created : 18 Apr 2013 by <andelf@gmail.com>
%%%-------------------------------------------------------------------
-module(dns_proxy_srv).

Building Riak on SmartOS, the hard way

Build Machine

Here is some information on the build machine I'm using for reference:

  1. Dataset

    $ dsadm list

UUID OS PUBLISHED URN

#!/bin/bash
# NOTE: this is an OSX launchd wrapper shell script for Tomcat (to be placed in $CATALINA_HOME/bin)
CATALINA_HOME=/Users/username/tomcat
function shutdown() {
date
echo "Shutting down Tomcat"
$CATALINA_HOME/bin/catalina.sh stop
#!/usr/bin/env escript
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% Copyright 2013 Ulf Wiger <ulf@wiger.net>
%% License: http://opensource.org/licenses/MIT
main(Args) ->
Options = check_args(Args),
start_dist(Options),
Result = rpc(Options),

Install ImageMagick for image conversion:

brew install imagemagick

Install tesseract for OCR:

brew install tesseract --all-languages

Or install without --all-languages and install them manually as needed.

This is a general-purpose function to ask Yes/No questions in Bash, either with or without a default answer. It keeps repeating the question until it gets a valid answer.

@Zabrane
Zabrane / main.erl
Created November 29, 2020 21:50 — forked from hamidreza-s/main.erl
How to use Parse Transform feature in Erlang for meta-programming.
-module(main).
-export([hi/0, bye/0, hey/1]).
-compile({parse_transform, main_pt}).
hi() -> io:format("Hi there!~n").
bye() -> io:format("Bye there!~n").
hey(foo) -> io:format("Hey foo!~n");
hey(bar) -> io:format("Hey bar!~n").
@Zabrane
Zabrane / http-benchmark.md
Created December 3, 2020 06:40 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)