Skip to content

Instantly share code, notes, and snippets.

View nandajavarma's full-sized avatar
🐌
Snailing

Nandaja Varma nandajavarma

🐌
Snailing
View GitHub Profile
@nandajavarma
nandajavarma / example.js
Created September 15, 2013 13:01
Welcome to your first Gist! Gists are simple code reminders. Whenever you come across a piece of code you think might be useful later on, save it as a Gist. With GistBox, you can also tag the Gist with a label. This is especially useful for keeping them organized by language, project or purpose. For more info about GistBox, visit: http://www.gi…
// log an object to the browser console
console.log({ text: "foobar" });
#!/bin/sh
# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
warning()
{
echo "WARNING: $1" >&2
}
#!/usr/bin/ruby
pages = Array.new
queries = Array.new
puts "Enter the input. Hit ctrl + D when done!"
ARGF.each do |line|
if line[0].downcase == 'p'
pages << line.downcase
elsif line[0].downcase == 'q'
queries << line.downcase
else next
#!/usr/bin/ruby
pages = Array.new
queries = Array.new
puts "Enter the input. Hit ctrl + D when done!"
ARGF.each do |line|
if line[0].downcase == 'p'
pages << line.downcase
elsif line[0].downcase == 'q'
queries << line.downcase
else next
# -*- coding: utf-8 -*-
import urllib2
import re
import csv
from bs4 import BeautifulSoup
import sys
from sys import argv
def getlinks(csvfile):
links = []
Routing issues
Summary page not loading
Spec failures(resque and a not so random spec failure from qanda)
@nandajavarma
nandajavarma / zshrc
Created September 10, 2014 17:03
.zshrc
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="gallois"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[violet]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
git_custom_status() {
local cb=$(current_branch)
if [ -n "$cb" ]; then
echo "$(parse_git_dirty)%{$fg_bold[yellow]%}$(work_in_progress)%{$reset_color%}$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
autocmd BufWritePre * :%s/\s\+$//e
set wrap
set linebreak
" note trailing space at end of next line
set showbreak=>\ \ \
stripesize=128k
stripe_elements=10
dataalign=1280k
function create_lv {
vgname=$1
lvname=$2
pvname=$3
poolname=$4
KB_PER_GB=1048576
# STRIPESIZE is 128 * 10