This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd /opt/erlang | |
$ ln -s /opt/erlang/R14B02 current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ export ERL_HOME=/opt/erlang/current | |
$ export PATH=$ERL_HOME/bin:$PATH | |
$ export LD_LIBRARY_PATH=$ERL_HOME/lib:$LD_LIBRARY_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ERL_HOME=/opt/erlang/current | |
export PATH=$ERL_HOME/bin:$PATH | |
export LD_LIBRARY_PATH=$ERL_HOME/lib:$LD_LIBRARY_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(fact). % This is the file 'fact.erl', the module and the filename MUST match | |
-export([fac/1]). % This exports the function 'fac' of arity 1 (1 parameter, no type, no name) | |
fac(0) -> 1; % If 0, then return 1, otherwise (note the semicolon ; meaning 'else') | |
fac(N) when N > 0, is_integer(N) -> N * fac(N-1). | |
% Recursively determine, then return the result | |
% (note the period . meaning 'endif' or 'function end') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daemonize yes | |
pidfile /var/run/redis/redis-server.pid | |
port 6379 | |
bind 0.0.0.0 | |
timeout 0 | |
loglevel notice | |
logfile /var/log/redis/redis-server.log | |
databases 16 | |
save 900 1 | |
save 300 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Pretty printing styles. Used with prettify.js. */ | |
/* SPAN elements with the classes below are added by prettyprint. */ | |
.pln { color: #000; font-size: 80% } /* plain text */ | |
@media screen { | |
.str { color: #080; font-size: 80% } /* string content */ | |
.kwd { color: #008; font-size: 80% } /* a keyword */ | |
.com { color: #800; font-size: 80% } /* a comment */ | |
.typ { color: #606; font-size: 80% } /* a type name */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// # Ghost Configuration | |
// Setup your Ghost install for various environments | |
var path = require('path'), | |
config; | |
config = { | |
// ### Development **(default)** | |
development: { | |
// The url to use when providing links to the site, E.g. in RSS and email. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Which base image to build FROM? | |
FROM ubuntu | |
#What to RUN for the new build? | |
#Adding apt tools | |
RUN apt-get install -y python-software-properties | |
#Adding the nodejs ppa's | |
RUN add-apt-repository -y ppa:chris-lea/node.js | |
#001: Fixing broken dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from optparse import OptionParser | |
from time import sleep | |
import requests | |
def main(): | |
parser = OptionParser(usage="usage %prog [options]", version="%prog 1.0") | |
parser.add_option("-d", "--domain", | |
action = "store", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Redis In-Memory Data Store | |
After=network.target | |
[Service] | |
User=redis | |
Group=redis | |
ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf | |
ExecStop=/usr/local/bin/redis-cli shutdown | |
Restart=always |