Skip to content

Instantly share code, notes, and snippets.

@nivir
nivir / .gitconfig
Last active September 14, 2015 07:47 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@nivir
nivir / Global.sublime-settings
Created October 23, 2015 00:27 — forked from benatkin/Global.sublime-settings
excluding node_modules from Sublime Text 2
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
}
@nivir
nivir / .gitconfig
Created November 16, 2015 13:39 — forked from rab/.gitconfig
A good starting point for ~/.gitconfig
# -*- Conf -*-
[color]
branch = auto
diff = auto
status = auto
showbranch = auto
ui = true
# color.branch
# A boolean to enable/disable color in the output of git-branch(1). May be set to always, false (or
@nivir
nivir / .gitconfig
Created November 16, 2015 22:25 — forked from eculver/.gitconfig
Sample .gitconfig
[user]
name = Joe User
email = joe@joeuser.com
[branch]
autosetupmerge = true
[branch "master"]
remote = origin
merge = refs/heads/master
@nivir
nivir / README.md
Created November 17, 2015 08:08 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@nivir
nivir / list_modifications.py
Created January 4, 2016 03:15 — forked from preshing/list_modifications.py
List the contents of folders recursively, sorted by modification time.
#! /usr/bin/env python
# License: http://creativecommons.org/publicdomain/zero/1.0/
# See http://preshing.com/20130115/view-your-filesystem-history-using-python
import optparse
import os
import fnmatch
import time
# Parse options
parser = optparse.OptionParser(usage='Usage: %prog [options] path [path2 ...]')
@nivir
nivir / exif_date.py
Created January 4, 2016 03:49 — forked from ikoblik/exif_date.py
Python script to update image creation and modification dates to the EXIF date.
#!/usr/bin/env python
"""A simple utility to restore file creation and modification
dates back to their original values from EXIF.
This script requires exif module to be installed or the exif
command line utility to be in the path.
To function correctly under windows this script needs win32file and
win32con modules. Otherwise it will not be able to restore the creation
@nivir
nivir / Default (Linux).sublime-keymap
Created January 6, 2016 14:59 — forked from thbkrkr/Default (Linux).sublime-keymap
Custom & Eclipse shortcuts key bindings (keyboard mapping) for Sublime Text 2 and 3
[
{ "keys": ["f12"], "command": "htmlprettify"},
{ "keys": ["f1"], "command": "fold" },
{ "keys": ["f2"], "command": "unfold" },
{ "keys": ["ctrl+à"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@"} },
{ "keys": ["ctrl+!"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["ctrl+space"], "command": "auto_complete" },
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
# This little gist shows how to easily internationalize your application using the meteor-just-i18n package.
# Package repository: https://github.com/subhog/meteor-just-i18n/
# 1. Adding the package.
$ meteor add anti:i18n
@nivir
nivir / gist:288c9deae0282f0e3c9d424098ccffdd
Created June 21, 2016 15:29 — forked from n00neimp0rtant/gist:9515611
simple squash without rebase
## within current branch, squashes all commits that are ahead of master down into one
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case)
## commit any working changes on branch "mybranchname", then...
git checkout master
git checkout -b mybranchname_temp
git merge --squash mybranchname
git commit -am "Message describing all squashed commits"
git branch -m mybranchname mybranchname_unsquashed
git branch -m mybranchname