Skip to content

Instantly share code, notes, and snippets.

View joemccann's full-sized avatar
💭
Thinking

Joe McCann joemccann

💭
Thinking
View GitHub Profile
@phaze9
phaze9 / titanium.macapp.bash
Created July 1, 2011 09:05
Titanium Studio Local Packaging Example
/Library/Application\ Support/Titanium/sdk/osx/1.1.0/tibuild.py -d ~/tmp -n -t bundle -a /Library/Application\ Support/Titanium/sdk/osx/1.1.0/ ~/Projects/Titanium\ Studio\ Workspace/MyApp
@saikat
saikat / gist:1084146
Created July 15, 2011 05:43
Stripe sample checkout form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Sample Form</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<script type="text/javascript">
<html>
<head>
<script src="/socket.io/socket.io.js"></script>
</head>
<body>
<div id="output"></div>
<script>
function write (msg) {
var p = document.createElement('p');
p.innerHTML = 'LOG: ' + msg;
@brianleroux
brianleroux / npm-picnic.md
Created September 6, 2011 19:11
nodeconf camp discussion about npm things

npm hangout

wherein we hang out and talk about npm stuff and occasionally mock ruby

using npm for building node extensions

  • npm catches missing node-waf and/or node-waf deps like python - charlie
How to add cmd-left-arrow and cmd-right-arrow (without shift) key bindings to the mac os x Terminal
app if the Lion install removed this bindings from your system.
1) Open "System Preferences".
2) Go to "Keyboard".
3) Select the "Keyboard Shortcuts" tab.
4) Select "Application Shortcuts" from the list of items in the left.
5) Press "+" to add a new shurtcut.
6) As "Application" select "Terminal", as "Menu Title" use: "Select Next Tab". For the "Keyboard Shortcut" field just select the field and press cmd-right-arrow.
7) Repeat again from step 5, using "Select Previous Tab" as Menu Title and pressing cmd-left-arrow as keyboard shortcut.
@calderas
calderas / npm.js
Created October 6, 2011 18:57
npm setup
npm config set registry http://registry.npmjs.org/
npm config set proxy http://http-proxy.com:80
npm install -d
@davidwood
davidwood / FUCK-YA.md
Created December 9, 2011 19:59
List content type of files in Cloudfiles container

How to list the content type of all files in a Cloudfiles container.

  1. Install node and npm
  2. Install the awesome Cloudfiles package from Nodejitsu
  3. Create a folder and save the dw-is-my-hero.js to that folder
  4. Edit dw-is-my-hero.js and change USERNAME and API_KEY to your username and API key
  5. Run node dw-is-my-hero.js CONTAINER_NAME
  6. Smile (and tell people how rad node.js is)
@pec1985
pec1985 / app.js
Created December 30, 2011 17:21
LinkedIn effect - Titanium
// right navigation button
var btn = Ti.UI.createButton({
title:'button'
});
// window
var win = Ti.UI.createWindow({
rightNavButton:btn,
backgroundColor:'blue'
});
@mbostock
mbostock / .block
Last active November 22, 2022 23:32
Line Transition
license: gpl-3.0
@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