Skip to content

Instantly share code, notes, and snippets.

@typpo
typpo / gist:5384301
Created April 14, 2013 21:32
top trigrams
a bunch of: 11
with mom and: 10
the old house: 10
a lot of: 9
sophia and i: 8
some sort of: 8
with a bunch: 7
i realize that: 7
hanging out with: 7
in a big: 5
/*
* A simple callback wrapper to have topics
*/
;(function(d) {
var topics = {};
d.Topic = function( id ) {
var callbacks,
method,
topic = id && topics[ id ];
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.
/*
* Support for putting text on a marker
* @author akearney
*/
L.TextIcon = L.Icon.extend({
options: {
iconUrl: undefined,
text: undefined,
},
createIcon: function() {
/*
* Support for putting text on a marker
* @author akearney
*/
L.TextIcon = L.Icon.extend({
options: {
iconUrl: undefined,
text: undefined,
},
createIcon: function() {
/*
* Support for putting text on a marker
* @author akearney
*/
L.TextIcon = L.Icon.extend({
options: {
iconUrl: undefined,
text: undefined,
},
createIcon: function() {
/*
* Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function($) { // Compliant with jquery.noConflict()
$.fn.jCarouselLite = function(o) {
o = $.extend({
@typpo
typpo / gist:8365399
Last active January 2, 2016 21:48
vimrc
set nocompatible
set backspace=indent,eol,start
set cul " cursor line
set cpo+=J
" causes python problems:
" set smartindent
" inoremap # X^H#
set cindent
@typpo
typpo / gist:9361188
Created March 5, 2014 04:30
.bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PS1='\[$bold$([ $? == 0 ] && echo "$blue" || echo "$red")\]\h\[$reset\]:$PWD\[$green\]$(__git_ps1)\[$reset\]$ '
# clipboard
@typpo
typpo / gist:9361196
Created March 5, 2014 04:30
.bash_aliases
alias l='ls'
alias ls='ls --color=auto'
alias ll='ls -l'
alias vi='vim'
alias rg='grep -r -I --exclude-dir="\.git" --exclude-dir="node_modules"'
if [ -x /usr/bin/colormake ]; then
alias make='colormake'
fi