Skip to content

Instantly share code, notes, and snippets.

View kumarsoumya's full-sized avatar
🌊

Soumya Kumar kumarsoumya

🌊
  • ThreatQuotient, Inc.
  • Washington, D.C.
View GitHub Profile

A good commit message looks like this:

Header line: explaining the commit in one line

Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.

The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
@eloyz
eloyz / basic_search_algorithms.py
Last active September 16, 2017 02:12
Depth First Search and Breath First Search Algorithm http://youtu.be/zLZhSSXAwxI
def dfs(graph, start, result=[]):
"""
Depth First Search
Follow each path in depth until
there are no more unvisted nodes.
Then reverse until we find an unvisited
node and continue to the depth of that path.
Repeat until there are no more unvisted nodes.
"""
@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)