Skip to content

Instantly share code, notes, and snippets.

View dylanharrington's full-sized avatar

Dylan Harrington dylanharrington

  • Cupertino, CA
  • 00:51 (UTC -07:00)
View GitHub Profile
@mdp
mdp / dropboxbackup.sh
Created May 21, 2015 23:07
Backup your git based projects on Dropbox
#!/bin/bash
projectName=${PWD##*/} # Basename of current dir
gitRemote=~/Dropbox/src/${projectName}.git
echo "Creating bare repo in ${gitRemote}"
git init --bare ${gitRemote}
echo "Adding new remote 'dropbox'"
git remote add dropbox ${gitRemote}
git remote -v
@junegunn
junegunn / vimawesome.vim
Last active September 2, 2025 05:06
Plugin completion using VimAwesome API
" ----------------------------------------------------------------------------
" vimawesome.com
" ----------------------------------------------------------------------------
function! VimAwesomeComplete() abort
let prefix = matchstr(strpart(getline('.'), 0, col('.') - 1), '[.a-zA-Z0-9_/-]*$')
echohl WarningMsg
echo 'Downloading plugin list from VimAwesome'
echohl None
ruby << EOF
require 'json'
@sausman
sausman / CyaSS.jsx
Created February 21, 2015 22:13
CyaSS React Component - mimic :hover and :active with inline styles
import React from "react/addons";
import m from "./m";
// https://www.youtube.com/watch?v=GOiVYbWJDOA
export default class CyaSS extends React.Component {
constructor() {
super();
this.state = {
hover: false,
active: false
@chibicode
chibicode / .vimrc
Created July 27, 2014 10:08
Goodbye Vim, Hello Sublime Text, and My Final .vimrc
" vim:fdm=marker
" Vundle {{{
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'airblade/vim-gitgutter'
Bundle 'bling/vim-airline'
Bundle 'chriskempson/base16-vim'
@mdominiak
mdominiak / postgres.rdoc
Created September 16, 2011 20:36
Setting up and Using PostgreSQL for Ruby on Rails development on OS X
brew update
brew install postgresql

Create a database:

initdb /usr/local/var/postgres

If this is your first install, automatically load on login with:

mkdir -p ~/Library/LaunchAgents
@schacon
schacon / gist:942899
Created April 26, 2011 19:19
delete all remote branches that have already been merged into master
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
awk '{split($0,a,"/"); print a[2]}' |
xargs git push origin --delete
@cowboy
cowboy / jquery-pluginization.js
Created July 12, 2010 17:36
jQuery Pluginization (see comment for slide order)
(function($){
// Store fetched long URLs here.
var cache = {};
$.longUrl = function( url, callback, options ) {
// Override defaults with specified options.
options = $.extend( {}, $.longUrl.options, options );
var params = {};