Generate a new Elixir project using mix
and add cowboy
and plug
as dependencies in mix.exs
:
defp deps do
[
{:cowboy, "~> 1.0.0"},
{:plug, "~> 0.8.1"}
]
end
Generate a new Elixir project using mix
and add cowboy
and plug
as dependencies in mix.exs
:
defp deps do
[
{:cowboy, "~> 1.0.0"},
{:plug, "~> 0.8.1"}
]
end
docker volume ls
docker volume create --name mysql-data
mysql-data
Create a file inside a volume, the container is terminated. The container is restarted, and the file is still there
#!/bin/bash | |
# Perform installation as root | |
# Install prereqs | |
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++ | |
# Get Collectd, untar it, make it and install | |
wget http://collectd.org/files/collectd-5.4.0.tar.gz | |
tar zxvf collectd-5.4.0.tar.gz |
#!/usr/bin/env python | |
import sys | |
import subprocess | |
import re | |
import string | |
try: | |
import json | |
except: | |
import simplejson as json |
convert app-icon.png | |
\( -clone 0 -resize 16x16 \) | |
\( -clone 0 -resize 32x32 \) | |
\( -clone 0 -resize 48x48 \) | |
\( -clone 0 -resize 64x64 \) | |
-delete 0 -alpha on -background transparent favicon.ico |
user www-data; | |
worker_processes 4; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
Reference: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/
wget -r https://dl.dropbox.com/u/45842273/2012-07-15-wheezy-raspian-minimal.img.7z
yum install p7zip
7za e 2012-07-15-wheezy-raspian-minimal.img.7z
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda 2012-07-15-wheezy-raspian-minimal.img -net nic -net user -vnc :0 -net tap,ifname=vnet0,script=no,downscript=no
// Basic XMPP bot example for HipChat using node.js | |
// To use: | |
// 1. Set config variables | |
// 2. Run `node hipchat_bot.js` | |
// 3. Send a message like "!weather 94085" in the room with the bot | |
var request = require('request'); // github.com/mikeal/request | |
var sys = require('sys'); | |
var util = require('util'); |
tanodb is a distributed in memory key value store built on top of riak_core.
It is used as the example code for the Little Riak Core Book.
(kudos to @cv for the original version)
I found the following piece of code in a gist, but when I tried to execute it under taminodb, it returned an empty array.
%%%------------------------------------------------------------------- | |
%%% @author <andelf@gmail.com> | |
%%% @copyright (C) 2013, | |
%%% @doc | |
%%% | |
%%% @end | |
%%% Created : 18 Apr 2013 by <andelf@gmail.com> | |
%%%------------------------------------------------------------------- | |
-module(dns_proxy_srv). |