Skip to content

Instantly share code, notes, and snippets.

View skchawala's full-sized avatar

satish kumar skchawala

View GitHub Profile
@skchawala
skchawala / git-change-commit-messages.md
Created January 11, 2018 06:44 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@skchawala
skchawala / circular_import_solution.md
Last active August 18, 2017 17:47
Circular imports in Python 2 and Python 3: when are they fatal? When do they work?

When are Python circular imports fatal?

In your Python package, you have:

  • an __init__.py that designates this as a Python package
  • a module_a.py, containing a function action_a() that references an attribute (like a function or variable) in module_b.py, and
  • a module_b.py, containing a function action_b() that references an attribute (like a function or variable) in module_a.py.

This situation can introduce a circular import error: module_a attempts to import module_b, but can't, because module_b needs to import module_a, which is in the process of being interpreted.

But, sometimes Python is magic, and code that looks like it should cause this circular import error works just fine!

@skchawala
skchawala / index.html
Created July 17, 2017 18:21 — forked from enjalot/index.html
Simple Pie Chart example with D3.js
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Testing Pie Chart</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script>
<style type="text/css">
@skchawala
skchawala / sendmail_setup.md
Created July 5, 2017 05:05 — forked from kany/sendmail_setup.md
Setup SENDMAIL on Mac OSX Yosemite
@skchawala
skchawala / 0-startup-overview.md
Created March 15, 2017 16:57 — forked from dideler/0-startup-overview.md
Startup Engineering notes