Skip to content

Instantly share code, notes, and snippets.

@sonphnt
sonphnt / script.sh
Created November 28, 2018 08:50 — forked from tonylukasavage/script.sh
Move all uncommitted changes to a new branch and revert the existing branch to HEAD. "master" has uncommitted changes. You decided you'd rather make those changes in "dev_branch". Here's how to move those uncommitted changes to "dev_branch" and then revert "master" to its last commit.
# get into the master branch
git checkout master
# create a new branch for the changes and check it out
git checkout -b dev_branch
# stash the changes until we revert master
git stash
# go back to master
#I am using the Azure Resource Manager cmdlets to get hold of the dll. https://docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps?view=azurermps-4.0.0
Add-Type -Path "C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.ApiManagement\Microsoft.IdentityModel.Clients.ActiveDirectory.dll"
$azuretenantADName = "yourtenant.onmicrosoft.com"
$userName = "user1@yourtenant.onmicrosoft.com"
$userPassword = "password" #Using plain text password for demo purpose.
#Authority to Azure AD Tenant
$AzureADAuthority = "https://login.microsoftonline.com/$azuretenantADName/oauth2/v2.0/authorize"
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@sonphnt
sonphnt / AngularJS-Windows-Authentication.authentication.js
Created January 31, 2017 13:48 — forked from definitelynotsoftware/AngularJS-Windows-Authentication.authentication.js
AngularJS Windows Authentication Service using .NET Web API and Hot Towel template
angular.module('app')
.factory("authentication", ["$http", "$q", "$window", authentication]);
function authentication($http, $q, $window) {
var user;
function login() {
// check if the user already exists for this session
@sonphnt
sonphnt / Recipe.md
Created December 23, 2013 10:47 — forked from ekfriis/Recipe.md

Setting up the GIS stack on AWS

General

sudo apt-get install fail2ban
sudo apt-get install htop
sudo apt-get install git