Skip to content

Instantly share code, notes, and snippets.

View anshulguleria's full-sized avatar
💭
I may be slow to respond.

Anshul Guleria anshulguleria

💭
I may be slow to respond.
View GitHub Profile
#!/bin/bash
#
# git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html)
# modified by mike@mikepearce.net
# modified by aconway@[redacted] - handle diffs that introduce new files
#
# Generate an SVN-compatible diff against the tip of the tracking branch
# Get the tracking branch (if we're on a branch)
# TRACKING_BRANCH=`git svn info | grep URL | sed -e 's/.*\/dev\///'`
@anshulguleria
anshulguleria / ssh_config
Last active December 16, 2015 05:13
Map ssh user other for different hosts
# location of this file is ~/.ssh/config
Host <<some_host>>
HostName <<full_host_name>>
User <<username_you_want_to_use>>
@anshulguleria
anshulguleria / git_commands.sh
Last active December 15, 2015 05:13
Basic git related help
# make vim as my editor for commits in git
git config --global core.editor "vim"
# make git cache my credentials
git config --global credential.helper 'cache --timeout=7200'
# color full log aliased to "lg"
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
{
"name": "jslibcors",
"version": "0.0.1",
"description": "Cors implementation for js library for viralmint",
"main": "index.js",
"config": {
"browserifyEntries": "src/js/init/config-dev.js src/js/init/main.js",
"browserifyOutput": "build/client/bundle.js",
"targetHtmlPath": "build/client/",
"servePort": 8080
@anshulguleria
anshulguleria / tmux.conf
Created September 1, 2015 05:40
Configuration file for tmux
# Tmux settings
# Set XTerm key bindings
setw -g xterm-keys on
# Set colors
set-option -g default-terminal "screen-256color"
# Set reload key to r
bind r source-file ~/.tmux.conf
@anshulguleria
anshulguleria / darkbg.js
Created June 5, 2015 07:37
Light box kind of script. Dims the page color for better reading
var mine = document.createElement('div');
mine.style.position = "fixed";
mine.style.left = 0; mine.style.top = 0;
mine.style.right = 0; mine.style.bottom = 0;
mine.style.background = "rgba(0,0,0,0.4)"
mine.style.zIndex = -1;
document.body.appendChild(mine);
@anshulguleria
anshulguleria / eslintrc
Last active May 12, 2016 11:12
configuration files for my linux setup
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"es6": true
},
"ecmaFeatures": {
"blockBindings": true,
"forOf": true,
@anshulguleria
anshulguleria / .vimrc
Last active August 29, 2015 14:13
Basic configuration for .vimrc using vundle plugin manager
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@anshulguleria
anshulguleria / 0_reuse_code.js
Created October 17, 2013 11:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console