Skip to content

Instantly share code, notes, and snippets.

View samof76's full-sized avatar
๐Ÿ’
Swinging branches

Samuel Vijaykumar M samof76

๐Ÿ’
Swinging branches
View GitHub Profile
@samof76
samof76 / redis-sentinel.sh
Created August 7, 2015 12:50
Redis sentinel init.d script
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-sentinel
# Required-Start: $syslog $remote_fs
# Required-Stop: $syslog $remote_fs
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-sentinel - Failover for Redis
FROM ubuntu:12.04
#ADD https://gist.githubusercontent.com/samof76/4d15d92910b6cec8efae/raw/bcba158b46e82b9625d1883c6bd9567a96b6ac86/sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y curl lsb-release
RUN curl http://apt.basho.com/gpg/basho.apt.key | apt-key add -
RUN bash -c "echo deb http://apt.basho.com $(lsb_release -sc) main > /etc/apt/sources.list.d/basho.list"
RUN apt-get update
RUN apt-get install -y riak
@samof76
samof76 / sources.list
Created July 25, 2014 07:31
Ubuntu sources.list
#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
@samof76
samof76 / sources.list
Created June 3, 2014 07:58
Custome Ubuntu Apt Sources File
#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
###### Ubuntu Update Repos
deb http://in.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://in.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
@samof76
samof76 / sources.list
Created April 3, 2014 11:19
Apt sources list file
#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
@samof76
samof76 / Dockerfile
Created October 15, 2013 07:51
Dockerfile for creating ghost containers
#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.
@samof76
samof76 / config.js
Created October 15, 2013 06:32
Ghost config.js
// # 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.
/* 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 */
@samof76
samof76 / redis.conf
Last active December 23, 2015 17:09
Sample Redis configuration
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
@samof76
samof76 / fact.erl
Created June 3, 2011 11:05
Erlang Install - Sample
-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')