Skip to content

Instantly share code, notes, and snippets.

Avatar

Olivier Eeckhoutte oeeckhoutte

View GitHub Profile
@oeeckhoutte
oeeckhoutte / Dockerfile_codebox
Last active Sep 6, 2015
Dockerfile to install codebox on port 8080
View Dockerfile_codebox
FROM ubuntu:latest
WORKDIR /workspace
RUN apt-get update && \
apt-get install -y make g++ python git curl && \
curl -sL https://deb.nodesource.com/setup | sudo bash - && \
apt-get install -y nodejs && \
npm -g install node-gyp codebox && \
cd /usr/lib/node_modules/codebox/node_modules/shux/node_modules/pty.js && \
@oeeckhoutte
oeeckhoutte / reverseProxy
Created Nov 6, 2012
[Node] Simple reverse Proxy
View reverseProxy
var util = require('util'); //Used to debug - inspect cmd
d = function (debugString) {
console.log(util.inspect(debugString, true, 6, true));
};
t = function (traceString) {
console.log('---> ' + traceString);
};
@oeeckhoutte
oeeckhoutte / Express 2.x
Last active Oct 13, 2015
[Node] Simple Node.js Server using Express < 3.0
View Express 2.x
/**
* Module dependencies.
*/
var express = require('express');
var app = module.exports = express.createServer();
// Configuration
app.configure(function(){
app.use(express.bodyParser());
app.use(express.methodOverride());
@oeeckhoutte
oeeckhoutte / installing_cassandra.md
Created Nov 8, 2015 — forked from hkhamm/installing_cassandra.md
Installing Cassandra on Mac OS X
View installing_cassandra.md

Installing Cassandra on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@oeeckhoutte
oeeckhoutte / Express 3
Last active Dec 10, 2015
[Node] Simple Node.js Server using Express 3.0
View Express 3
/**
* Module dependencies.
*/
var express = require('express');
var app = express();
// Configuration
app.configure(function(){
app.use(express.bodyParser());
app.use(express.methodOverride());
@oeeckhoutte
oeeckhoutte / Debug
Last active Dec 10, 2015
[Node] debug header when lazy for node
View Debug
var util = require('util'); //Used to debug - inspect cmd
d = function(debugString) {
console.log(util.inspect(debugString, true, 2, true));
};
t = function(traceString) {
console.log('---> ' + traceString);
};
@oeeckhoutte
oeeckhoutte / gist:4526223
Last active Dec 11, 2015
[OSX] Schedule launch bash script using agent
View gist:4526223
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.abee.autodeploy</string>
<key>OnDemand</key>
<true/>
<key>RunAtLoad</key>
<false/>
@oeeckhoutte
oeeckhoutte / Mongoose
Created Jan 17, 2013
[Node] Mongoose | MongoDB methods
View Mongoose
//FIND
dbSchemasName.ModelName.find({ 'key1': value1, 'key2': value2 }, function (err, resultFromDB) {
if(resultFromDB.length === 0) {
var model = {
key1: value1,
key2: value2
};
}
});
@oeeckhoutte
oeeckhoutte / debian
Created Jan 17, 2013
[Linux] Bashrc alias to increase productivity
View debian
# quick update
alias upgrade='apt-get update && apt-get upgrade && apt-get clean'
# Extract most know archives with one command
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
@oeeckhoutte
oeeckhoutte / gist:5363363
Created Apr 11, 2013
[Bash][Debian] Install Python 2.7
View gist:5363363
sudo apt-get install build-essential libsqlite3-dev zlib1g-dev libncurses5-dev libgdbm-dev libbz2-dev libreadline5-dev libssl-dev libdb-dev
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -xzf Python-2.7.3.tgz
cd Python-2.7.3
./configure --prefix=/usr --enable-shared
make
sudo make install