Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
host=$1
port=$2
# Make sure we got the host name
if (( ${#host} == 0 )); then
echo "usage: $0 <hostname> [port]"
exit 1
elif (( ${#port} == 0 )); then
# Ubuntu upstart file at /etc/init/mongodb.conf
pre-start script
mkdir -p /var/lib/mongodb/
mkdir -p /var/log/mongodb/
end script
start on runlevel [2345]
stop on runlevel [06]
@pilgrim2go
pilgrim2go / states.go
Created October 23, 2014 08:10
lcd number ( ported from http://rubyquiz.com/quiz14.html)
package main
import "os"
import "fmt"
// import "sort"
import "strings"
import "time"
var LCD_STATES =[]string {
"HORIZONTAL",
"VERTICAL",
package main
import (
"fmt"
"reflect"
)
//function types
type mapf func(interface{}) interface{}
package main
import (
"fmt"
"math"
"os"
"reflect"
)
var p = fmt.Println
This gist provides a simple setup to add Sentry logging to OpenERP/Odoo.
As Odoo's logging setup is rather limited, I'm using syslog to collect and forward logs to Sentry.
These scripts should run without any modification on an Ubuntu based server, assuming the paths and user names for openerp match with the ones in the `supervisord.conf` file.
Kudos go to:
* https://gist.github.com/avoine/2912777
* http://hashbang.fr/openerp-log.html
---
- name: Deploy new site release
user: deployer
hosts: all
tasks:
- name: Fetch repo updates
git: >
repo=git@github.com:my/repo.git
#!/bin/bash
#
# Starts up a MongoDB replica set
#
# There is a lot of documentation about replica sets:
#
# http://docs.mongodb.org/manual/reference/replica-configuration/
# http://docs.mongodb.org/manual/administration/replica-sets/
#
# To read data from a SECONDARY, when in the client, use:
@pilgrim2go
pilgrim2go / gist:113e6c0b92f5763bd6ac
Last active September 7, 2015 05:24 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@pilgrim2go
pilgrim2go / instructions.md
Created December 10, 2015 08:48 — forked from tpai/instructions.md
use both Tor and Privoxy with Mac OSX

1. install

brew install tor
brew install privoxy

2. copy and modify config file