Skip to content

Instantly share code, notes, and snippets.

@thatch45
thatch45 / gist:2563169
Created April 30, 2012 22:20
Install from source
'make && make install':
cmd.run:
- unless: 'cat /usr/bin/redis'
- require:
- cmd: 'git clone <redis source>'
'git clone <redis source>':
cmd.run:
- unless: 'test -e /usr/src/redis'
- cwd: /usr/src
@coreyti
coreyti / something.html.erb
Created November 30, 2012 22:34
blacklist select javascript errors from being reported to Airbrake/Hoptoad
<%#
NOTES:
* Works with current version (0.1.0) notifier.js hosted at:
http://airbrake.io/javascripts/notifier.js (also https://...)
* Does not need to be HTML or ERB. You just need some way to get your
Airbrake API key and other server-side variables into the javascript.
* This example uses jQuery to load the notifier.js script. Feel free to
adjust as desired for framework-independence.
%>
@mattmccray
mattmccray / backbone_helper.coffee
Created October 14, 2010 08:44
Use Backbone.js classes as native CoffeeScript classes
# Backbone CoffeeScript Helpers by M@ McCray.
# Source: http://gist.github.com/625893
#
# Use Backbone classes as native CoffeeScript classes:
#
# class TaskController extends Events
#
# class TaskView extends View
# tagName: 'li'
# @SRC: '<div class="icon">!</div><div class="name"><%= name %></div>'
@torgeir
torgeir / install_redis_on_ubuntu.md
Last active June 7, 2018 17:44 — forked from lucasmazza/script.md
Redis 2.4.8 Install on Ubuntu 10.04

Installation commands:

$ wget http://redis.googlecode.com/files/redis-2.4.8.tar.gz
$ tar xvfz redis-2.4.8.tar.gz 
$ cd redis-2.4.8/
$ mkdir -p /opt/redis
$ make PREFIX=/opt/redis install
$ cp redis.conf /opt/redis/redis.conf
$ chown -R redis:redis /opt/redis

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

@SlexAxton
SlexAxton / .zshrc
Last active April 25, 2023 03:57
My gif workflow
gifify() {
if [[ -n "$1" ]]; then
if [[ $2 == '--good' ]]; then
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif
rm out-static*.png
else
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
fi
else
@bhenerey
bhenerey / ideal ops.md
Created May 23, 2012 19:40
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan