Skip to content

Instantly share code, notes, and snippets.

View murarisumit's full-sized avatar
🎩
Welcome here

Sumit Murari murarisumit

🎩
Welcome here
View GitHub Profile
@murarisumit
murarisumit / beautiful_idiomatic_python.md
Last active May 15, 2018 03:07 — forked from JeffPaine/beautiful_idiomatic_python.md
Transforming Code into Beautiful, Idiomatic Python: #starred #python

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@murarisumit
murarisumit / syncIIS.bat
Created September 3, 2015 06:09
Web Deply sync IIS
%msdeploy% -verb:sync -source:webServer,computerName='https://SourceIP:8172/msdeploy.axd',authType=Basic,username='USERNAME',password='PASSWORD' -dest:webServer,computerName='https://DestinationIP:8172/msdeploy.axd',authType=Basic,username='USERNAME',password='PASSWORD' -allowUntrusted=true
@murarisumit
murarisumit / stop_all_sites_iis.bat
Created September 9, 2015 07:59
Stop all running sites at IIS #iis
c:\windows\system32\inetsrv\appcmd.exe list site /xml /state:"$=started" | c:\windows\system32\inetsrv\appcmd.exe stop site /in
@murarisumit
murarisumit / .vimrc
Created September 12, 2015 17:19
vimrc file
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'bling/vim-airline'
@murarisumit
murarisumit / perseverance.md
Created September 15, 2015 12:43
Patience, persistence and perseverance #murarisumit

Take your time to build something you will be proud of. Patience, persistence and perseverance will take you anywhere you want to go

@murarisumit
murarisumit / msdeploy_sync_skip_file.bat
Created September 16, 2015 06:25
Msdeploy ignore some file
::Skip file with name .pdb, someFile.xml and .config$
msdeploy.exe -verb:sync -source:contentPath=SourcePath -dest:DestPath -skip:objectName=filepath,absolutepath="^*\.pdb$" -skip:objectName=filepath,absolutepath="^*\someFile.xml$" -skip:objectName=filepath,absolutepath="^*\someotherfile.aspx$" -skip:objectName=filepath,absolutepath=".config$"
@murarisumit
murarisumit / gist:45fae1d1c21c1afa386e
Created October 21, 2015 12:30 — forked from PiBa-NL/gist:531373a49264aeb5dc3f
Haproxy stand alone stats listen section
listen MyStats
mode http
bind 0.0.0.0:1000
stats enable
stats uri /
# if authentication is wanted
acl auth_ok http_auth(stats-auth)
http-request auth unless auth_ok
@murarisumit
murarisumit / gist:5a82f3c69e0a9d37239b
Last active July 15, 2016 13:25 — forked from apoo/gist:2279196
Managing multiple SSH Keys for different GitHub Accounts
Create separate SSH key for your personal account and your company.
Put these file in different location in your .ssh folder.
Upload them to your github account and finally create a **config file for your SSH**
Create a config file in ~/.ssh/config
vim config:
@murarisumit
murarisumit / git-aliases.md
Created January 7, 2016 05:10 — forked from mwhite/git-aliases.md
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.

Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.

The simplest way to add an alias for a specific git command is to use a standard bash alias.

# .bashrc
@murarisumit
murarisumit / rsync
Created January 26, 2016 05:03
Remote RSYNC example
rsync -a file -e 'ssh -i security_file -p 22' use@addr:file