Skip to content

Instantly share code, notes, and snippets.

View nordineb's full-sized avatar

Nordine Ben Bachir nordineb

  • Bekk
  • Oslo, Norway
View GitHub Profile
; AutoHotkey script, download from:
; http://www.autohotkey.com/
; NOTE: Save this file with Windows line endings i.e. \r\n
;
cmd_line := "C:\bin\cygwin\bin\mintty.exe /bin/zsh --login"
wnd_class := "ahk_class mintty"
#c::
## --------------------------------------------------------------------------------------
##
## This script is used to control how we deploy packages to Windows Azure.
## Orignial script (https://gist.github.com/PaulStovell/5234255) customized for
## Staging-To-Production with VIP swap deployment.
##
## NOTE: the script will only do Staging+VIP swap if $OctopusAzureSlot == "Staging".
## If $OctopusAzureSlot == anything else, the script will deploy directly to that slot
## without any further swapping.
##
{
"homepage": "http://www.iis.net/learn/install/web-platform-installer/web-platform-installer-v4-command-line-webpicmdexe-rtw-release",
"version": "7.1.50430",
"license" : "http://www.microsoft.com/web/webpi/eula/webpi_45_en.htm",
"architecture": {
"64bit": {
"url": "http://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi",
"hash": "fd3aa11da27a4698d9fd1fb61dcb5cae6d95ecf70554f0d655b0caf44b0d0ac6"
},
@nordineb
nordineb / gist:50b150912d23d80aee3e
Last active May 15, 2022 07:42 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan Developer Preview 2

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@nordineb
nordineb / AddCerts.cmd
Created June 9, 2016 12:39 — forked from mikeblakeuk/AddCerts.cmd
Getting HTTPS to work on TeamCity Agents with a self cert pfx
echo For my cloud agents, I had to get the pfx alias, Import the CARoot.cer, merge the pfx, and then change the password.
echo Based on https://github.com/haron/startssl-java and https://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html
cd %~dp0
set JAVA_HOME=C:\BuildAgent\jre
set KEYTOOL=%JAVA_HOME%\bin\keytool
set KEYSTORE=%JAVA_HOME%\lib\security\cacerts
set PASSWORD=changeit
echo "Importing StartSSL certificates into %KEYSTORE%" > run.log
rem C:\BuildAgent>jre\bin\keytool -list -keystore .\conf\ssl\build.cloudapp.net.pfx -storetype pkcs12
@nordineb
nordineb / Login With Service Principal
Created October 26, 2016 10:39
Login With Service Principal
$AzureAccountPassword = "xxxxxxxxxxxxxxxxxxxxxxxxx"
$AzureAccountUsername = "xxxxxxxxxxxxxxxxxxxxxxxxx"
$AzureAccountTenantId = "xxxxxxxxxxxxxxxxxxxxxxxxx"
$secpasswd = ConvertTo-SecureString -AsPlainText $AzureAccountPassword -Force
$mycreds = New-Object System.Management.Automation.PsCredential($AzureAccountUsername,$secpasswd )
Login-AzureRmAccount -ServicePrincipal -Credential $mycreds -TenantId $AzureAccountTenantId
Get-AzureWebsite
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
[System.Net.ServicePointManager]::Expect100Continue = {$false}
[System.Net.ServicePointManager]::CheckCertificateRevocationList = $true;
[System.Net.ServicePointManager]::DefaultConnectionLimit = 1000;
[System.Net.ServicePointManager]::MaxServicePoints = 1000;
[System.Net.ServicePointManager]::ReusePort = $true;
[System.Net.ServicePointManager]::UseNagleAlgorithm = $false;
[System.Net.ServicePointManager]::EnableDnsRoundRobin = $false;
$url = "https://data-nsr.udir.no"
(Get-AzureRmResource -ResourceGroupName testRG -ResourceType Microsoft.Web/sites -ResourceName testwebapp).Properties.OutboundIpAddresses -Split ","
@nordineb
nordineb / Demo-AzureADModuleV2.ps1
Created January 26, 2017 14:54 — forked from craig-martin/Demo-AzureADModuleV2.ps1
Demo-AzureADModuleV2.ps1
### Server management tools preview (next month): https://blogs.technet.microsoft.com/servermanagement/2016/02/09/introducing-server-management-tools/
### View the online docs
start https://docs.microsoft.com/en-us/powershell/azuread/v2/azureactivedirectory
### Find the module
Find-Module AzureAD | Select-Object *
<#
Version Name Repository Description
<#
Script showing how to create a KeyVault vault and enable logging
(GUIDs redacted)
#>
New-AzureRmResourceGroup -Name cmartRG0614 -Location westus
<#
ResourceGroupName : cmartRG0614
Location : westus
ProvisioningState : Succeeded