Skip to content

Instantly share code, notes, and snippets.

@lsbardel
lsbardel / redis-server-for-init.d-startup
Created December 15, 2009 21:01 — forked from mtodd/redis-server-for-init.d-startup
Init.d Redis script for Ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active June 18, 2024 18:27
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@bdotdub
bdotdub / redis.markdown
Created November 24, 2010 22:18
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

I've been trying to understand how to setup systems from the ground up on Ubuntu. I just installed redis onto the box and here's how I did it and some things to look out for.

To install:

@midgetspy
midgetspy / new_features.txt
Created January 10, 2011 22:28
Planning for new features I intend to implement
Time Zones
Make a list of time zone name, id, offsets inside SB. In the config UI provide a dropbox with every timezone and store the id in the config file.
Need to fix:
- don't change wanted eps until midnight MST or something
bash -c '
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
yum install -q -y sudo gcc gcc-c++ automake autoconf make readline-devel.x86_64 libffi-devel.x86_64 libyaml-devel.x86_64 zlib-devel.x86_64 openssl-devel.x86_64 wget
# This may not be necessary for you
yum remove -q -y ruby-libs ec2-ami-tools
wget http://someurl.domain.com/ruby-1.9.2p180_x86_64.rpm -O /tmp/ruby-1.9.2p180_x86_64.rpm
yum localinstall --nogpgcheck -q -y /tmp/ruby-1.9.2p180_x86_64.rpm
@aq1018
aq1018 / airvideo-server
Created April 6, 2011 07:44
init-script for airvideo-server using start-stop-daemon
#!/bin/bash
#
# create a new user called airvideo
# $ sudo adduser airvideo
# place this file in /etc/init.d/airvideo-server
# change the file permission to executable:
# $ sudo chmod +w /etc/init.d/airvideo-server
# add it to default run level
# $ sudo update-rc.d airvideo-server defaults
#
@karmi
karmi / ElasticSearch.org.Website.Search.FieldNotes.markdown
Created April 8, 2011 17:15
Field notes gathered during installing and configuring ElasticSearch for http://elasticsearch.org

ElasticSearch.org Website Search: Field Notes

These are field notes gathered during installation of website search facility for the ElasticSearch website.

You may re-use it to put a similar system in place.

The following assumes:

@rdegges
rdegges / proxy_nginx.sh
Created April 11, 2011 05:30
Create a HTTP proxy for jenkins using NGINX.
sudo aptitude -y install nginx
cd /etc/nginx/sites-available
sudo rm default
sudo cat > jenkins
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
@pksunkara
pksunkara / config
Last active June 21, 2024 08:46
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@kesor
kesor / gist:1029749
Created June 16, 2011 17:27
RSyslog <-> ElasticSearch LogStash events
We couldn’t find that file to show.