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 / grafana-prometheus-values.yaml
Created November 13, 2018 10:48 — forked from rohancme/grafana-prometheus-values.yaml
Values for the grafana helm chart to talk to an existing prometheus datasource
enabled: true
- ReadWriteOnce
size: 5Gi
apiVersion: 1
murarisumit /
Created November 12, 2017 23:18 — forked from st4lk/
Python logging settings for root logger
Settings for root logger.
Log messages will be printed to console and also to log file (rotated, with
specified size). All log messages from used libraries will be also handled.
Three approaches for defining logging settings are used:
1. using logging classes directly (py25+, py30+)
2. using fileConfig (py26+, py30+)
3. using dictConfig (py27+, py32+)
Choose any variant as you like, but keep in mind python versions, that
murarisumit /
Created January 7, 2016 05:10 — forked from mwhite/
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 / 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 / gist:45fae1d1c21c1afa386e
Created October 21, 2015 12:30 — forked from PiBa-NL/gist:531373a49264aeb5dc3f
Haproxy stand alone stats listen section
listen MyStats
mode http
stats enable
stats uri /
# if authentication is wanted
acl auth_ok http_auth(stats-auth)
http-request auth unless auth_ok
murarisumit /
Last active May 15, 2018 03:07 — forked from JeffPaine/
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 /
Last active September 1, 2015 12:31 — forked from JeffPaine/
General vim notes.

Vim Notes

  • set list Shows invisible characters.
  • set listchars What invisibile characters should be set to, see :h listchars for complete list.

Key Remapping

  • map creates a key map that works in normal, visual, select and operator pending modes
  • map! creates a key map that works in insert and command-line mode.
murarisumit /
Last active August 29, 2015 14:28 — forked from OnlyInAmerica/
Find an AWS IAM user corresponding to an AWS Access Key
# Find the IAM username belonging to the TARGET_ACCESS_KEY
# Useful for finding IAM user corresponding to a compromised AWS credential
# Requirements:
# Environmental variables:
# python:
# boto
murarisumit / 0_reuse_code.js
Last active August 29, 2015 14:22
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
murarisumit / resetPasswordJenkins.txt
Last active August 29, 2015 14:20 — forked from gmhawash/gist:4043232
Reset password for jenkins
0. SSH to server
1. Edit jenkins_home/config.xml
2. set userSecurity to false: <userSecurity>false</userSecurity>
3. delete
<authorizationStrategy> and <securityRealm>
4. /etc/init.d/bitnami restart