sudo apt install openjdk-8-jdk-headless
# Useful references: | |
# | |
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line | |
# https://ss64.com/vb/sendkeys.html | |
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell | |
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/ | |
# | |
# Future enhancements - use events rather than an infinite loop | |
$wsh = New-Object -ComObject WScript.Shell | |
while (1) { |
$ms-greenLight: "[theme:greenLight, default:#bad80a]"; | |
$ms-neutralSecondaryAlt: "[theme:info, default:#767676]"; | |
$ms-neutralLight: "[theme:infoBackground, default:#eaeaea]"; | |
$ms-magenta: "[theme:magenta, default:#b4009e]"; | |
$ms-magentaDark: "[theme:magentaDark, default:#5c005c]"; | |
$ms-magentaLight: "[theme:magentaLight, default:#e3008c]"; | |
$ms-neutralDark: "[theme:neutralDark, default:#212121]"; | |
$ms-neutralLight: "[theme:neutralLight, default:#eaeaea]"; | |
$ms-neutralLighter: "[theme:neutralLighter, default:#f4f4f4]"; | |
$ms-neutralLighterAlt: "[theme:neutralLighterAlt, default:#f8f8f8]"; |
// Set up the ADAL instance, we will use the throughout the app | |
export var adalInstance = new AuthenticationContext({ | |
instance: 'https://login.microsoftonline.com/', | |
// The client ID of the app from the Azure Portal | |
clientId: 'aabbccee-aabb-1122-3344-556677889900', | |
// Where do we want to go after logging out | |
postLogoutRedirectUri: window.location.origin, | |
Web have a node application written in ES6/babel which cannot (yet) be run by the latest stable node engine.
Locally we use babel-node
to run the application using babel's on-the-fly transpiler;
However this is strongly discourages on the production environment (due to memory and performance footprints).
So we would need to transpile our application to the stable ECMA and deploy the artefacts to Azure -- instead of the original app.
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
This documented is a slightly adapted version to this one: https://gist.github.com/jsuwo/9038610 by Jeff Shantz. He has a fantastic video series on setting up Jenkins on AWS EC2 here: https://www.youtube.com/watch?v=1JSOGJQAhtE&feature=youtu.be&ab_channel=JeffShantz
- Choose 1-2GB Ubuntu Server
- Create new security group and Enable HTTP (& leave SSH open)
- Launch!
- Don't.
- Close Visual Studio and don't open it again until I tell you. Visual Studio is not competent at renaming things.
- Assuming you're using git, clean the working folder to remove anything that's not in version control (this will help the search-and-replace step because it won't have to go through a bunch of generated files)
git clean -fdx