Skip to content

Instantly share code, notes, and snippets.

View anildigital's full-sized avatar
:octocat:

Anil Wadghule anildigital

:octocat:
View GitHub Profile

Keybase proof

I hereby claim:

  • I am anildigital on github.
  • I am anildigital (https://keybase.io/anildigital) on keybase.
  • I have a public key whose fingerprint is 8D19 0F1E 9493 9306 6066 96B6 6E1A 604F 82E6 14C6

To claim this, I am signing this object:

@anildigital
anildigital / git_default_settings.md
Last active August 29, 2015 14:23
Useful Git commands and defaults

Show git branch name in Bash prompt

Put this line in your ~/.bashrc or ~/.bash_profile

export PS1="\h:\W \u\$(__git_ps1 \" (%s) \")\$ "

Configure shortcuts

git config --global alias.co checkout
@anildigital
anildigital / gist:78c882a48b46d140cfac
Created July 4, 2015 14:25
Git Object Model - Commands used
# Prints unique sha1 for the file
git hash-object data/number.txt
#Lists commit object ids
git rev-list --objects —all
# Lists out the git objects
find .git/objects -type f
# Lists files added to git index
@anildigital
anildigital / 0_reuse_code.js
Last active August 29, 2015 14:24
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
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
javascript: './public/javascripts/app.jsx'
},
output: {
path: __dirname + "/public",
filename: 'bundle.js'

Hi Runners,

We are going to meet tomorrow at 6:40am outside Hyatt Regency Entrance gate.

We will do quick warm up.

Run starts at 7am sharp from outside Hyatt

Here is the route https://www.strava.com/routes/2996162

svn status | grep "^\\?" | sed -e 's/? *//' | sed -e 's/ /\\\\ /g' | xargs rm
find %s | egrep \"rb$\" | xargs ctags-exuberant -a -e -f %s/TAGS --exclude=vendor --exclude=public --exclude=log --exclude=db
class MyThread
def initialize(thread_name)
thread1(thread_name)
end
def thread1(thread_name)
Thread.new do
for i in (1..10)
puts "in #{thread_name} Thread"
sleep(1)
#!/usr/bin/env ruby
#
# Author: Anil Wadghule
#
# FRenamer: Renames image files for passed command line parameters
# Usage: frenamer . "the_dark_knight"
# It renames image files in current directory with names like the_dark_knight_1.jpg, the_dark_knight_2.jpg ...
#
# Installation:
# Copy it to your /usr/bin or any directory which is in your PATH