Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am billyvg on github.
  • I am billy (https://keybase.io/billy) on keybase.
  • I have the public key with fingerprint 502B 567B D829 C2AB C7ED  ADA5 B47F 92BD 7C87 79E2

To claim this, I am signing this object:

@billyvg
billyvg / grunt-flo.js
Created May 28, 2014 23:56
grunt task for integrating with fb-flo
module.exports = function(grunt) {
// easy way to load grunt tasks in package.json
// require('load-grunt-tasks')(grunt);
// or the normal way
grunt.task.loadNpmTasks('grunt-concurrent');
grunt.task.loadNpmTasks('grunt-contrib-connect');
grunt.task.loadNpmTasks('grunt-contrib-watch');
// configure local dev server
grunt.config('connect.dev', {
class MainView extends React.Component {
_addEntry(e) {
this.props.navigator.push({
title: 'New',
component: AddEntryView,
rightButtonTitle: 'Save',
onRightButtonPress: (e) => {
// save
},
});
@billyvg
billyvg / .vimrc
Created January 3, 2011 17:48
My vimrc file
set nocompatible " No vi support
set nobackup " Don't create backups
set mouse=a " Enable mouse support
set confirm " Fuck if I know
set ruler " Show cursor position
set number " Show line numbers
set showcmd " Show (partial) command in status line
set wildmenu " Show wild menu
set wildmode=list:longest
set nocompatible
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8
" Whitespace stuff
@billyvg
billyvg / .bash_prompt
Created June 3, 2011 19:31
my bash prompt
#### requires vcprompt ---- http://vc.gerg.ca/hg/vcprompt/archive/tip.tar.gz #####
#### PS1 customization ####
twolevelprompt='$([ "$PWD" != "${PWD%/*/*/*}" ] && echo "...${PWD##${PWD%/*/*}}" || echo "$PWD")'
NONE="\[\033[0m\]" # unsets color to term fg color
# regular colors
K="\[\033[0;30m\]" # black
R="\[\033[0;31m\]" # red
G="\[\033[0;32m\]" # green
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set history=1000
set foldmethod=marker
set hidden
set backspace=indent,eol,start " Allow backspacing over everything in insert mode
set showcmd " Show (partial) command in status line
set autowrite " Automatically save before commands like :next and :make
def challenge(number):
begin, end = divmod(number, 100)
middle = (number % 1000) / 10
return (begin + end) == middle
for x in xrange(1000, 9999):
if challenge(x):
print x
/**
* Any anals should be done here.
*
*/
$(function() {
(function(anal) {
$('.follow').on('click', function(e) {
anal.push(['_trackEvent', 'Rightrail', 'follow_' + $(this).data('type') + '_link', $(this).data('id')]);
});
# bindings
unbind C-b
unbind %
set -g prefix C-a
bind-key C-a last-window
bind-key R source-file ~/.tmux.conf
# pane bindings
bind \ split-window -h
bind - split-window -v