Skip to content

Instantly share code, notes, and snippets.

@crcastle
crcastle / file1.js
Created September 3, 2011 03:56 — forked from TooTallNate/file1.js
module.exports = function (a, b) {
return a + b
}
// Production steps of ECMA-262, Edition 5, 15.4.4.18
// Reference: http://es5.github.com/#x15.4.4.18
if (!Array.prototype.forEach) {
Array.prototype.forEach = function( callback, thisArg ) {
var T, k;
if ( this == null ) {
throw new TypeError( " this is null or not defined" );
}
var O = Object(this);
var len = O.length >>> 0;
@crcastle
crcastle / autoclose_janus
Created September 5, 2011 23:51 — forked from jackkinsella/autoclose_janus
How to add autoclose to Janus
#~/.janus.rake file
vim_plugin_task "autoclose", "git://github.com/Townk/vim-autoclose.git"
#~/vimrc.local file
let g:AutoClosePairs = {'(': ')', '{': '}', '[': ']', '"': '"', "'": "'", '#{': '}', '|':'|' }
let g:AutoCloseProtectedRegions = ["Character"]
@crcastle
crcastle / gist:1524814
Created December 27, 2011 19:04 — forked from arnorhs/gist:1517095
gitopen - Open all files from a git diff or show command
#!/bin/bash
# This script will open all files from a git diff or a git show in vim.
# My bash skills are a bit primitive so this can probably be done more intelligently
# Usage:
# gitopen -- opens all added files that have changed since HEAD
# gitopen diff HEAD -- these are the default parameters
# gitopen diff master -- opens files that have changed from master
@crcastle
crcastle / git-svn notes.txt
Created March 12, 2012 18:26 — forked from dcarney/git-svn notes.txt
Some hastily-scribbled notes about using git-svn with our existing git repos
Set the SVN_EDITOR var:
# export SVN_EDITOR=vim
==================================
SETTING UP A NEW SVN PROJECT
==================================
Create a new SVN "repo" (aka folder):
(NOTE: https is required for our new SVN, as well as --username)
# svn mkdir https://some/url/path/to/newRepo --username first.last
@crcastle
crcastle / counter.rb
Created July 4, 2012 07:11 — forked from luigi/counter.rb
Calculate the percentage of tweets linking to a website that came from the Tweet button
#
# Before running:
# $ gem install twitter
#
# To run:
# $ ruby counter.rb sleazywebsite.com
#
# Context:
# http://luigimontanez.com/2012/actually-social-media-buttons-work-really-well
#
githubAccount() { # Syntax: githubAccount <file>
# Check for Github account name
if [[ "$githubAccount" == '' ]]; then
if [[ ! -f "$file" ]]; then
# If .github doesn't exist then ask for the name and save it
echo -n "What is your Github name? "
read githubAccount
touch "$file"
echo "$githubAccount" > "$file"
else

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discussions around concrete examples, not handy-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g