Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am megahbite on github.
  • I am megahbite (https://keybase.io/megahbite) on keybase.
  • I have a public key whose fingerprint is 1A79 0FB5 732D D774 C56F 9950 CE53 2A25 E764 6F95

To claim this, I am signing this object:

@megahbite
megahbite / gist:67a78a99152e687a656a
Created October 5, 2014 21:17
Capistrano 3 configuration for starting/stopping/restarting Unicorn
namespace :deploy do
desc 'Start application'
task :start do
on roles(:app), in: :sequence, wait: 5 do
within "#{release_path}" do
execute :bundle, :exec, :unicorn, '-D', '-E', :production, "-c", "config/unicorn.rb"
end
end
end
@megahbite
megahbite / nziff_calendar.user.js
Last active August 29, 2015 14:03
NZIFF add to calendar script
// ==UserScript==
// @name NZIFF 2014 Google Calendar Button
// @description Adds a button to the NZ International Film Festival wishlist items to add them to Google Calendar
// @downloadURL https://gist.githubusercontent.com/megahbite/c4e34f24c0827ccd820c/raw/nziff_calendar.user.js
// @include http://www.nziff.co.nz/2014/*/wishlist/*
// @include http://www.nziff.co.nz/s/*
// @namespace https://github.com/megahbite/
// @require //cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js
// @version 1.0b2
// ==/UserScript==
.blink {
@include animation(blink 1.5s step-end infinite);
}
@include keyframes(blink) {
0% { visibility: visible; }
50% { visibility: hidden; }
}
@megahbite
megahbite / upload_repo.cap
Created March 11, 2014 23:01
Capistrano 3 task for deploying on a server that has no outgoing SSH access to a repository
namespace :local_repo do
desc "Upload and deploy code from local copy of repo"
task :upload do
run_locally do
execute :rm, '-rf', 'repo.git'
execute :git, :clone, '--bare', '--single-branch', "-b #{fetch(:branch)}", ".", "repo.git"
execute :tar, '-czvf', 'repo.tar.gz', 'repo.git'
end
on roles(:app) do