Skip to content

Instantly share code, notes, and snippets.

osuka / packages.json
Created Jan 10, 2014
Have bower automatically launch with npm install. Makes life easier for people just wanting to use your code. Automatically downloads bower, then call 'bower install' after npm install. From
View packages.json
"name": "webapp",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
"bower": ""
"engines": {
View jshint-reporter.js
"use strict";
// see
// and
module.exports = {
reporter: function (res) {
var len = res.length;
var str = "";
if (!len) {
osuka / Gruntfile.js
Created May 30, 2013
Sample gruntfile for Firefox OS projects, including testing, code coverage. Requires npm, bower and ruby (for compass)
View Gruntfile.js
Needs a configuration file with paths
for Gaia and standalone simulator
File contents for grunt.local.json (config):
"b2g_bin_path": "/Applications/",
"gaia_homepath": "/Users/OAmat/Documents/code/gaia"
osuka /
Created May 30, 2013
Bash script for setting remote debugging options for Firefox OS
# Defines two properties needs for firefoxOS remote debugging
# Usage:
# ./ gaia_home
# If the port is busy it will be ignored and lanuched listening
osuka /
Created Jun 17, 2012
Create hi-res versions of images with Inkscape and Crop them with Gimp
howmany=`ls *.svg|wc -l`
if [ $howmany -eq 0 ] ; then
echo "Please launch this from inside a folder with svg files."
# In Mac OS X scripting only works when invoked with FULL PATH
osuka / gist:1221739
Created Sep 16, 2011
Twitter T&C as of august 2011
View gist:1221739
I. Twitter Content
1. All use of the Twitter API and content, documentation, code, and related materials made available to you on or through Twitter ("Twitter Content") is subject to and must comply with these Rules. As a reminder, you and your Service are subject to the Twitter Terms of Service.
2. You may use the Twitter API and Twitter Content in connection with the products or services you provide (your "Service") to search, display, analyze, retrieve, view, and submit information to or on Twitter. You may use the Twitter name or logos and other brand elements that Twitter makes available in order to identify the source of Twitter Content ("Twitter Marks") subject to these Rules.
3. Your use of the Twitter API and Twitter Content are subject to certain limitations on access, calls, and use as set forth in the Rules, on, or as otherwise provided to you by Twitter. If Twitter believes that you have attempted to exceed or circumvent these limitations, your ability to use the Twitter API and
osuka / gist:1189374
Created Sep 2, 2011
How to add bash git completion on Mac OS X
View gist:1189374
Download and install an official git from
It already includes the bash completion script.
Add this to your .bash_profile:
source /usr/local/git/contrib/completion/git-completion.bash
PS1='[\u@\h \w$(__git_ps1 " (%s)")]\$ '