Skip to content

Instantly share code, notes, and snippets.

@ecarnevale
ecarnevale / prepare-commit-msg.sh
Created October 3, 2019 16:15 — forked from wingleung/prepare-commit-msg.sh
Automatically prepend JIRA issue key to commit message
#!/bin/sh
#
# Automatically adds Jira key to commit message
#
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
@ecarnevale
ecarnevale / fullscreen-24.diff
Created March 29, 2012 15:03
Add ns-toggle-fullscreen to Emacs 24
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 084b62f..b7ed1a2 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -1267,6 +1267,10 @@ the operating system.")
(add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system))
+(declare-function ns-toggle-fullscreen-internal "nsfns.m" ())
+(defun ns-toggle-fullscreen ()
@ecarnevale
ecarnevale / gist:2108860
Created March 19, 2012 11:47 — forked from marcel/gist:2100703
giftube – Generates an animated gif from a YouTube url.
#!/usr/bin/env ruby
# giftube – Generates an animated gif from a YouTube url.
#
# Usage:
#
# giftube [youtube url] [minute:second] [duration]
#
# ex.
#
#!/usr/bin/env ruby
require 'mail'
# source = 'archives/2005-11.txt'
# month = 11
# year = 2005
#
# system "perl -ne 'if(/^From /){open F,\">eml/msg-#{year}-#{month}-\".++$m.\".eml\"}print F' #{source}"
@ecarnevale
ecarnevale / gist:999654
Created May 31, 2011 00:02 — forked from RobSpectre/gist:999620
Tagging an object on FluidINFO
fluidDB.put({
url: 'about/' + encodeURIComponent(sender.tab.url) + '/jeterfilter/contains-jeter',
payload: Math.round(((new Date()).getTime()-Date.UTC(1970,0,1))/1000),
async: false,
primitive: true,
username: fluidDBUsername,
password: fluidDBPassword,
success: function(json) {
console.log('URI tagged as containing Jeter.');
}
;; I'm not saying this is good Clojure, but it was off the top of my head
;; It's a title bot for jschat.org
(import '(java.io BufferedReader InputStreamReader PrintWriter))
(import '(java.net Socket))
(import '(java.net HttpURLConnection URL))
(use '[clojure.contrib.json.read :only (read-json)])
(use '[clojure.contrib.json.write :only (json-str)])
;; Data structures
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
*.pbxproj -crlf -diff -merge
#!/usr/bin/env python
#
# FlickrTouchr - a simple python script to grab all your photos from flickr,
# dump into a directory - organised into folders by set -
# along with any favourites you have saved.
#
# You can then sync the photos to an iPod touch.
#
# Version: 1.1
require 'open-uri'
# url dsl -- the ultimate url dsl!
#
# You just can't beat this:
#
# $ irb -r url_dsl
# >> include URLDSL
# => Object
# >> http://github.com/defunkt.json