git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
"use strict"; | |
import React, {Component} from 'react'; | |
import calcContentHeight from './dom-textarea-measure'; | |
class AutogrowingTextarea extends Component { | |
constructor(props) { | |
this.props = props; | |
this.state = {}; | |
this.textareaProps = sanitizeChildProps(props); |
function setup_remote_key() { | |
cat ~/.ssh/id_rsa.pub | ssh $@ "cat - >> ~/.ssh/authorized_keys" | |
} |
module Freckle | |
module Date | |
class << self | |
def parse(string) | |
raw = string.to_s.strip | |
return nil if raw.empty? | |
begin | |
# reverse order if we encounter "European" formatting |
/* | |
* Copyright (c) 2012 Agency Republic | |
* | |
* Permission is hereby granted to use, modify, and distribute this file | |
* in accordance with the terms of the license agreement accompanying it. | |
*/ | |
package com.agencyrepublic.template | |
{ | |
/** | |
* Sample interface class. |
jQuery.fn.highlight = function (text, o) { | |
return this.each( function(){ | |
var replace = o || '<span class="highlight">$1</span>'; | |
$(this).html( $(this).html().replace( new RegExp('('+text+'(?![\\w\\s?&.\\/;#~%"=-]*>))', "ig"), replace) ); | |
}); | |
} | |
jQuery.fn.autolink = function (target) { | |
if (target == null) target = '_parent'; | |
return this.each( function(){ |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
# Retrieve repository URL | |
function svn-url() { | |
LANG=en_US svn info "$1" | grep '^URL *:' | sed 's/^URL *: //' | |
} | |
# Branching | |
function svn-branch() { | |
if [ ! -d .svn ]; then return 1; fi | |
if svn-url | grep '/trunk' &> /dev/null; then | |
echo trunk |
#!/usr/bin/env ruby | |
dry_run = ARGV.delete('--dry-run') | |
force = ARGV.delete('--force') | |
if ARGV.empty? | |
puts <<-USAGE | |
minify, swiftly concat and minify JavaScript files from the command line | |
Pass a single argument to create a .min.js version: |