Skip to content

Instantly share code, notes, and snippets.

View JeanMertz's full-sized avatar

Jean Mertz JeanMertz

View GitHub Profile
@cornet
cornet / test.rb
Created September 15, 2012 22:41
#
# Incrental rsync backups using rsync's --link-dest
#
# This requires the 'develop' branch of the backup gem
#
require 'net/ssh'
Backup::Model.new(:test, 'Description for test') do
@xslim
xslim / README.md
Created September 21, 2012 10:57
git commit hook for Harvest integration

Installation

  • Install hcl https://github.com/zenhob/hcl
  • cd MyProject
  • curl -L https://gist.github.com/raw/3760898/commit-msg.sh > .git/hooks/commit-msg
  • chmod +x .git/hooks/commit-msg
  • hcl tasks
  • Note ProjectID & TaskID
  • git config hooks.harvesttask "ProjectID TaskID"
  • Example: git config hooks.harvesttask "2551232 1441578"

Zero downtime deploys with unicorn + nginx + runit + rvm + chef

Below are the actual files we use in one of our latest production applications at Agora Games to achieve zero downtime deploys with unicorn. You've probably already read the GitHub blog post on Unicorn and would like to try zero downtime deploys for your application. I hope these files and notes help. I am happy to update these files or these notes if there are comments/questions. YMMV (of course).

Other application notes:

  • Our application uses MongoDB, so we don't have database migrations to worry about as with MySQL or postgresql. That does not mean that we won't have to worry about issues with the database with indexes being built in MongoDB or what have you.
  • We use capistrano for deployment.

Salient points for each file:

@avdgaag
avdgaag / auto_reference_pt_ids.rb
Last active December 15, 2015 02:39
Auto-labeling Git commits with Pivotal Tracker IDs found in the current branch name. This script is meant to be used as a Git `commit-msg` hook. It expects a single argument, the location of the temporary file with the commit message the user entered, and it outputs that same message with maybe some extra labels added to it.
#!/usr/bin/env ruby
# ## Introduction
#
# Auto-labeling Git commits with issues tracker IDs found in the current
# branch name. This script is meant to be used as a Git commit-msg hook. It
# expects a single argument, the location of the temporary file with the commit
# message the user entered, and it outputs that same message with maybe some
# extra labels added to it.
#
# ## Example
@steintore
steintore / Readme.md
Last active June 21, 2017 21:08
Build status and progress widget for Dashing

Description

Dashing widget to display a Jenkins build status and build progress

The widget is based on the meter-widget which is default in the Dashing installation

The widget can also see the progress of a "pre-build", i.e if you have a job triggering the actual build you want to define, you can configure this job in the jenkins_build.rb as a prebuild.

For more information, please see Coding Like a tosser

class Entities.Tasks extends Backbone.Collection
model: Entities.Task
url: -> "/project/#{@project_id}/tasks.json"
constructor: (options) ->
@project_id = options.project_id
super
project_tasks = new Entities.Tasks {project_id:project.id}
@christhekeele
christhekeele / ALLOWABLE.md
Last active May 16, 2023 10:27
Allowable: A Ruby gem DSL for compound conditionals.

Allowable

A micro-gem DSL for compound conditionals.

Allowable lets you decompose large/long conditional chains into readable, testable, and inspectable segments with Ruby blocks.

Installation

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 12, 2025 14:05
A badass list of frontend development resources I collected over time.
@jpetazzo
jpetazzo / gist:6127116
Created July 31, 2013 23:21
Debian/Ubuntu containers protips, thanks to @spahl
# this forces dpkg not to call sync() after package extraction and speeds up install
RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup
# we don't need and apt cache in a container
RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache
@fnichol
fnichol / README.md
Last active August 6, 2022 20:29
Testing on Mac Platforms with Test Kitchen

Testing Mac Platforms with Test Kitchen

We'll assume an OS X Mavericks (10.9) box here.

Requirements

You'll need:

  • Vagrant
  • Vagrant's VMware Fusion provider