Skip to content

Instantly share code, notes, and snippets.

BTW yum has last Redis too, remi repository at least.
$ sudo -i
$ yum list redis
$ redis.x86_64 2.6.13-1.el6.remi remi
But today we want compile redis from source (see http://redis.io/download)
$ yum install make gcc tcl
$ cd /usr/local/src
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
class Point
constructor: (@x = 0, @y = 0) ->
if isNaN(@x) or isNaN(@y)
throw new Error('Invalid coords')
add: (point) ->
@x += point.x
@y += point.y
subtract: (point) ->
@jamster
jamster / ab.rb
Created November 20, 2012 02:35 — forked from kylewlacy/ab.rb
Apache Bench Homebrew Formula
# Based on https://github.com/simonair/homebrew-dupes
# That repo seems to be dead, and I don't really feel like making a pull request.
require 'formula'
class Ab < Formula
homepage 'http://httpd.apache.org/docs/trunk/programs/ab.html'
url 'http://www.apache.org/dist/httpd/httpd-2.4.3.tar.bz2'
sha1 '0ef1281bb758add937efe61c345287be2f27f662'
depends_on 'libtool' => :build
@jamster
jamster / gist:3894881
Created October 15, 2012 19:53
Building a CentOS 6 Box for Vagrant
@jamster
jamster / gist:3796181
Created September 27, 2012 20:08 — forked from davist11/gist:1204569
Campfire sounds
56k: "https://123.campfirenow.com/images/56k.gif"
bueller: "anyone?"
clowntown: "https://123.campfirenow.com/images/clowntown.gif"
crickets: "hears crickets chirping"
dangerzone: "https://123.campfirenow.com/images/dangerzone.png"
deeper: "https://123.campfirenow.com/images/top.gif"
drama: "https://123.campfirenow.com/images/drama.jpg"
greatjob: "https://123.campfirenow.com/images/greatjob.png"
heygirl: ":sparkles::information_desk_person::sparkles:"
horn: ":dog: :scissors: :cat:"
@jamster
jamster / gist:3362954
Created August 15, 2012 19:39 — forked from saetia/gist:1623487
Clean Install – Mountain Lion OS X 10.8 DP3 Update 4
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
.axis text {
font: 10px sans-serif;
}
require File.dirname(__FILE__) + '/config/environment'
run ActionController::Dispatcher.new
#!/bin/bash
echo "Setting up chef..."
sudo apt-get -y update
sudo apt-get -y install ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential wget ssl-cert
cd /tmp
wget http://rubyforge.org/frs/download.php/57643/rubygems-1.3.4.tgz
tar zxf rubygems-1.3.4.tgz