This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global core.pager cat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/.bash_profile | |
======================= | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1='\[\033]0;$TITLEPREFIX:$PWD\007\]' # set window title | |
PS1="$PS1"'\n' # new line | |
PS1="$PS1"'\[\033[32m\]' # change to green | |
PS1="$PS1"'\u@\h ' # user@host<space> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git Bash for Windows | |
======================== | |
Release notes: C:/Program%20Files/Git/ReleaseNotes.html | |
Some console programs, most notably non-MSYS2 Python, PHP, Node and OpenSSL, interact correctly with MinTTY only when called through winpty (e.g. the Python console needs to be started as winpty python instead of just python). | |
This is true for running ruby files that require stdin. | |
Use: | |
e.g. $ winpty ruby ./lib/toy_robot_sim.rb | |
------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python Exercises http://www.practicepython.org/ | |
# Exercise 28 - Max of Three | |
# Exercise to return the largest of three numbers | |
# Last updated: 09/04/2016 | |
# Using PYTHON 3 | |
def max_of_three(one, two, three): | |
if one >= two: | |
if one >= three: | |
return one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python Exercises http://www.practicepython.org/ | |
# Exercise 27 - Tic Tac Toe Draw | |
# Exercise to draw Tic Tac Toe gameboard the game board getting input from Player 1 and Player 2 | |
# Last updated: 17/02/2016 | |
# | |
# - gets input from two players | |
# - checks the input for correctness: row,col | |
# - exits if board is full or there is a winner | |