I'm trying to figure out how to use rebar to:
- create erlang project
- add a dependency on an erlang module from github
- start the app via the erl console
- create a release and start the app from the release (via the generated scripts)
import sys | |
import gevent | |
from gevent.monkey import patch_all; patch_all() | |
from gevent import server, event, socket | |
from multiprocessing import Process, current_process, cpu_count | |
""" | |
Simple multiprocess StreamServer that proxies messages between clients. | |
Avoids using a multiprocessing.Event since it blocks on a semaphore. |
/* | |
author: jbenet | |
os x, compile with: gcc -o testo test.c | |
linux, compile with: gcc -o testo test.c -lrt | |
*/ | |
#include <time.h> | |
#include <sys/time.h> | |
#include <stdio.h> |
// -*- coding:utf-8-unix; mode:c; -*- | |
// | |
// get the active window on X window system | |
// | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <locale.h> | |
#include <X11/Xlib.h> // `apt-get install libx11-dev` |
""" | |
realertime.lib.spawn | |
~~~~~~~~~~~~~~~~~~~~ | |
:author: Adam Hitchcock | |
:copyright: (c) 2012 DISQUS. | |
:license: Apache License 2.0, see LICENSE for more details. | |
""" | |
from __future__ import absolute_import |
-module(encode_uri_rfc3986). | |
-author('Renato Albano <renatoalbano@gmail.com>'). | |
-export([encode/1]). | |
%% Taken from <http://erlangexamples.com/>, | |
%% from <http://github.com/CapnKernul/httparadise> | |
%% and <http://www.erlang.org/doc/man/edoc_lib.html> | |
encode([C | Cs]) when C >= $a, C =< $z -> |
Herewith is an example of encoding to and from base64 using OpenSSL's C library. Code presented here is both binary safe, and portable (i.e. it should work on any Posix compliant system e.g. FreeBSD and Linux).
The MIT License (MIT)
Copyright (c) 2013 Barry Steyn
#!/bin/bash | |
# Baidu Yun Command Line Interface | |
# Depends: bash, curl, grep, awk, sed, od | |
# (They are basicly builtin tools of any *nix system.) | |
# Additionally, fastupload depends: head, wc, md5sum or md5, cksum | |
# (Which are also builtin tools) | |
#### Variables #### |