Instance | Branch |
---|
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
Drop in replace functions for setTimeout() & setInterval() that | |
make use of requestAnimationFrame() for performance where available | |
http://www.joelambert.co.uk | |
Copyright 2011, Joe Lambert. | |
Free to use under the MIT license. | |
http://www.opensource.org/licenses/mit-license.php |
Mercurial Commands
Commands | Description |
---|---|
hg pull | get latest changes like git pull use flags like -u IDK why yet |
hg add | only for new files |
hg commit | add changes to commit with -m for message just like git |
hg addremove | adds new files and removes file not in your file system |
hg incoming | see changes commited by others |
hg outgoing | see local commits |
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
echo "PUT YOUR MAIL BODY HERE" | mailx -s "SUBJECT" -S smtp=smtp://yoursmtpserver.com -S smtp-auth=login -S smtp-auth-user=YOUR_USERNAME -S smtp-auth-password=YOUR_PASSWORD -S from="Sender Name <[email protected]>" [email protected] |
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
<# | |
.SYNOPSIS | |
The synopsis goes here. This can be one line, or many. | |
This version of the template has inbuilt functions to capture credentials and store it securely for reuse | |
Avoids the need to have plaintext passwords in the script | |
.DESCRIPTION | |
The description is usually a longer, more detailed explanation of what the script or function does. | |
Take as many lines as you need. |
I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.
For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.
Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.
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
#!/usr/bin/env bash | |
LOG_PATH="/home/$(whoami)/log/speedtest.log" | |
if result=$(/usr/bin/speedtest --simple); then | |
parsed_result=$(printf "${result}\"" | sed ':a;N;$!ba;s/\n/" /g' | sed 's/: /="/g') | |
printf "[$(date)] ${parsed_result}\n" >> "${LOG_PATH}" | |
else | |
printf "[$(date)] error\n" >> "${LOG_PATH}" | |
exit 1 |
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 A LIST OF INSTANCES | |
#/usr/sap/hostctrl/exe/saphostctrl -function Listinstances -format Script | |
#GET A LIST of databases | |
saphostctrl -nr 99 -function Listdatabases | |
# manage a db with the host agent | |
# /usr/sap/hostctrl/exe/saphostctrl -nr 99 -function StopDatabase -dbname NPL -dbtype ada -user sapadm passwd | |
#query a db with the host agent |
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
#!/usr/bin/env bash | |
if [ "$AWS_PROFILE" = "" ]; then | |
echo "No AWS_PROFILE set" | |
exit 1 | |
fi | |
for region in $(aws ec2 describe-regions --region eu-west-1 | jq -r .Regions[].RegionName); do |