2618
Display git branch in bash prompt
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\] \[\033[33;1m\]\w\[\033[m\] (\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \$ \n| => "
export PS2="| => "
bash  shell  prompt  customization 
yesterday
Easy Bash Prompt Generator
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
else
echo ""
fi
}

# get current status of git repo
function parse_git_dirty {
status=`git status 2>&1 | tee`
dirty=`echo -n "${status}" 2> /dev/null | grep "modified:" &> /dev/null; echo "$?"`
untracked=`echo -n "${status}" 2> /dev/null | grep "Untracked files" &> /dev/null; echo "$?"`
ahead=`echo -n "${status}" 2> /dev/null | grep "Your branch is ahead of" &> /dev/null; echo "$?"`
newfile=`echo -n "${status}" 2> /dev/null | grep "new file:" &> /dev/null; echo "$?"`
renamed=`echo -n "${status}" 2> /dev/null | grep "renamed:" &> /dev/null; echo "$?"`
deleted=`echo -n "${status}" 2> /dev/null | grep "deleted:" &> /dev/null; echo "$?"`
bits=''
if [ "${renamed}" == "0" ]; then
bits=">${bits}"
fi
if [ "${ahead}" == "0" ]; then
bits="*${bits}"
fi
if [ "${newfile}" == "0" ]; then
bits="+${bits}"
fi
if [ "${untracked}" == "0" ]; then
bits="?${bits}"
fi
if [ "${deleted}" == "0" ]; then
bits="x${bits}"
fi
if [ "${dirty}" == "0" ]; then
bits="!${bits}"
fi
if [ ! "${bits}" == "" ]; then
echo " ${bits}"
else
echo ""
fi
}

export PS1="\h@\`parse_git_branch\` "
customize  bash  shell  prompt 
yesterday
Does Water Affect Weight | Military.com
Daily Weight Gain - By drinking more water per day, you will have a series of weight gains throughout the day as a quart (32 oz) of water weighs two pounds. So, as I write this article and sip from my 32 oz glass, I will gain two lbs in the next 90 minutes. Now, I will likely be interrupted by Mother Nature and lose 1-2 lbs from the previous 32 oz glass of water I drank after my early workout. The easy answer is yes - drinking water does affect weight significantly enough to be seen on a scale immediately. Usually, in a 24 hour period, you will cycle through this process of gaining water weight and losing water weight and have either a net loss or stable weight for the day.
body  weight  water 
4 days ago
How to Launch GUI Applications from the Terminal
open -a ApplicationName

$ open
Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b ] [-a ] [filenames] [--args arguments]
Help: Open opens files from a shell.
By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL.
Options:
-a Opens with the specified application.
-b Opens with the specified application bundle identifier.
-e Opens with TextEdit.
-t Opens with default text editor.
-f Reads input from standard input and opens with TextEdit.
-F --fresh Launches the app fresh, that is, without restoring windows. Saved persistent state is lost, excluding Untitled documents.
-R, --reveal Selects in the Finder instead of opening.
-W, --wait-apps Blocks until the used applications are closed (even if they were already running).
--args All remaining arguments are passed in argv to the application's main() function instead of opened.
-n, --new Open a new instance of the application even if one is already running.
-j, --hide Launches the app hidden.
-g, --background Does not bring the application to the foreground.
-h, --header Searches header file locations for headers matching the given filenames, and opens them.
MacBook  macOS  launch  application  command  line  open 
9 days ago
Haml
What is it?
Haml (HTML abstraction markup language) is based on one primary principle: markup should be beautiful. It’s not just beauty for beauty’s sake either; Haml accelerates and simplifies template creation down to veritable haiku.
HAML 
17 days ago
Use the React project template with ASP.NET Core | Microsoft Docs
Run the CRA server independently
The project is configured to start its own instance of the CRA development server in the background when the ASP.NET Core app starts in development mode. This is convenient because it means you don't have to run a separate server manually.
asp.net  core  react 
17 days ago
« earlier      
1.1 10 2 2016 5 6 actionmailer ai ajax amazon and android api app art asp.net authentication azure backpack benchmark benchmarks bernie block blockchain blocks blog book books bootstrap brain browser bug build business c# career case certification charity cheatsheet chrome chromebook clevo code comparison compile configuration corda core coursera crime css custom data database db deadlift deployment design developer development devops di diet div diy docs documentation download drive ecc editor ef egpu election electric emacs email encryption entity entityframework enum environment error example extension external facebook file files finance financial flexbox format framework free future gae git github google grid guide gulp hack happiness health hero home howto html https hyper-v identity image install integration interview java javascript jerk jetbrains job jobs jquery json key keyboard knockout kotlin laptop learning life lighting linux logging love mac macbook machine machinelearning management manager marketing media medical memory microsoft middleware migration miles mode motherboard msdn multiple music mvc navbar net new nikon node nuget nvidia nyc oauth of online open origin osx park pattern paypal pc performance photography photos police politics power privacy problem programming project protection psychology python r3officehours radio rails razor react recovery reference remote repository rest review routing ruby safari sass scheduling school science screen search security sendgrid seo server service setup shooting shortcuts skateboard sleep social society software speedtest spring ssl stackoverflow stand startup string studio study success support surface test testing time to todo tools toread toreview towatch training travel trump tutorial tutorials ubuntu update url usb utilities utility v5 validation video visual visualstudio vm vpn vs vs2015 vs2017 watch water web webjob website windows windows10 work workout xamarin xunit

Copy this bookmark:



description:


tags: