Skip to content

Instantly share code, notes, and snippets.

View deanbot's full-sized avatar

Dean Verleger deanbot

View GitHub Profile

Install Android SDK CLI Ubuntu 20.04 WSL2 (Work in Progress)

Install Java 8

sudo apt install openjdk-8-jdk-headless

Android SDK

@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active July 5, 2024 10:17
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@jamesfreeman959
jamesfreeman959 / keepawake.ps1
Last active July 4, 2024 14:59
A very simple PowerShell script to keep a Windows PC awake and make lync think the user is active on the keyboard
# 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) {
@StfBauer
StfBauer / _theming.scss
Last active February 5, 2021 19:53
Sass Variables of all theme slots
$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]";
@hampusborgos
hampusborgos / AdalAuthentication.jsx
Last active July 12, 2019 08:01
An example using adal.js with React.
// 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,
@mvalipour
mvalipour / readme.md
Last active March 9, 2020 16:42
Transpile and Deploy ES6 node app to Azure app service using TeamCity and Octopus

Background

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.

Why not use kudu?

@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active July 5, 2024 06:54
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

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}

About History Rewriting

Delete the last commit

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:

@stephenharris
stephenharris / jenkins-ec2-continous-integration.md
Last active May 15, 2023 00:16
How to set up CI with Jenkins on AWS EC2 (and some notes)
@n3dst4
n3dst4 / renaming.markdown
Last active February 21, 2024 13:56
How to rename Visual Studio solutions and projects

How to rename solutions and projects in Visual Studio

  1. Don't.

How to rename solutions and projects that were created in Visual Studio

  1. Close Visual Studio and don't open it again until I tell you. Visual Studio is not competent at renaming things.
  2. 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

@mcandre
mcandre / sort-by-size.md
Last active June 21, 2024 04:22
Sort file and directories recursively by size

UNIX

Files: ls -lSh | tac

Directories: du -hd 1 | sort -h

Requires GNU coreutils (e.g., macOS users can run brew install coreutils).

macOS