View sample_replacement.sh
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
## | |
## Global variables | |
## | |
# The string which we wish to replace | |
STR_TO_REPLACE="STR_TO_REPLACE" | |
# The new value | |
STR_REPLACMENT="New Server URL" |
View install.sh
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
## | |
# This is an adoption from Oh My Zsh for Google Cloud Shell | |
# author - bobvanluijt | |
# source - https://github.com/bobvanluijt/google-cloud-shell-pro-zsh | |
## | |
main() { | |
# Install zsh | |
sudo apt-get -qq update |
View get-latest-tag-on-git.sh
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
# The command finds the most recent tag that is reachable from a commit. | |
# If the tag points to the commit, then only the tag is shown. | |
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object | |
# and the abbreviated object name of the most recent commit. | |
git describe | |
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix: | |
git describe --abbrev=0 | |
# other examples |
View dummy
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
# without `:` the values are optionals | |
while getopts abc flag; | |
do | |
case "${flag}" | |
in | |
a ) echo $optarg ; pa="$OPTARG"; echo $pa;; | |
b ) pb=${OPTARG};; | |
c ) pc=${OPTARG};; | |
\?) echo "Invalid option: kubde" 1>&2 ;; | |
: ) echo "Invalid option: $OPTARG requires an argument" 1>&2;; |
View gitbash-az
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
# Add az (Azure cli) to git bash | |
echo "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} ${15} > "%USERPROFILE%\AppData\Local\Programs\Git\mingw64\bin\az" |
View generateSANCertificate.sh
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
############################################################################# | |
## Usage: ## | |
## ## | |
## *** Requirements - CA certificate, privateKey & password ## | |
## ----------------------------------------------------------------------- ## | |
## Open git bash ## | |
## ## | |
## - Save this file as <fileName>.sh ## | |
## - Set the desired domains under [ alt_names ] ## | |
## or set the domains in array ## |
View gist:b84da56926b1231ff2860192eb378b83
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
Acai | |
Aceola | |
Alfalfa Sprouts | |
Apple | |
Apricot | |
Apricots | |
Artichoke | |
Asian Pear | |
Asparagus | |
Atemoya |
View GitScripts.sh
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
# Get last commit timestap of all branches in the remote | |
git fetch --all && for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
View ajax-exercises.txt
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
Exercise: Nutrition Facts | |
Create an empty webpage. | |
Download nutrition.xml from https://gist.github.com/3000322 and place in your project folder. | |
Use AJAX via jQuery or JS API to fetch the file into the page. | |
Create a table. For each <food> in the XML file, create a row in the table with the food name and nutritional facts - serving size, calories, carbs. | |
Bonus: Use the tablesorter jQuery plugin to make the table sortable by the nutritional facts. | |
Exercise: Lady Gaga News |
NewerOlder