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
//Use this script as proxy where you can specify custom headers | |
//that will be sent to destination server | |
//TODO | |
//[X] Measure request time and write it to console | |
//[ ] Write measured request time to log file instead of console | |
//[ ] Make lookup list of possible custom headers to simulate different logins | |
var http = require('http'); |
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
#!/bin/bash | |
# ---------------------- | |
# KUDU Deployment Script | |
# Version: 0.1.11 | |
# ---------------------- | |
# Helpers | |
# ------- |
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
// Based off example code from Hal Robertson | |
// https://github.com/halrobertson/test-restify-passport-facebook | |
// See discussion: https://groups.google.com/forum/?fromgroups#!topic/passportjs/zCz0nXB_gao | |
var restify = require('restify') | |
// config vars | |
var FB_LOGIN_PATH = '/api/facebook_login' | |
var FB_CALLBACK_PATH = '/api/facebook_callback' | |
var FB_APPID = '<<YOUR APPID HERE>>' |
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
public static class ObjectExtensions | |
{ | |
public static string GetMessageType(this object obj) | |
{ | |
return obj.GetType().AssemblyQualifiedName; | |
} | |
public static string ToJsonString(this object obj) | |
{ |
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
function Save-Password | |
{ | |
Param | |
( | |
[parameter(Mandatory = $true)] | |
[String] | |
$FilePath, | |
[parameter(Mandatory = $true)] | |
[Switch] |
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
Param( | |
[string][Parameter(Mandatory=$true)] $WebSiteName, | |
[string] $ResourceGroupName = $WebSiteName, | |
[string] $StorageAccountName = $ResourceGroupName.ToLowerInvariant() + "storage", | |
[string] $ResourceGroupLocation = "West Europe", | |
[string] $StorageContainerName = $WebSiteName.ToLowerInvariant(), | |
[string] $TemplateFile = '.\Templates\WebSiteDeploySQL.json' | |
) | |
$ErrorActionPreference = "Stop"; |
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
<# | |
# Create PWD File with this command: | |
# Read-Host -AsSecureString | ConvertFrom-SecureString | out-file <<<PATH_TO_FILE>>> | |
You can find instructions how to add deployment user to your subscription here: | |
http://azure.microsoft.com/en-us/documentation/articles/powershell-install-configure/ | |
#> | |
$pwdFilePath = "<<<PATH_TO_FILE>>>" |
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
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null; | |
$serverName = 'localhost'; | |
$vbbUserName = '<<<Add username here>>>'; | |
$databasesToWorkWith = @(<<<Added Databases Here>>>) | |
######################################## | |
$server = New-Object "Microsoft.SqlServer.Management.Smo.Server" $serverName; | |
$login = $server.Logins[$vbbUserName]; |
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
public static bool IsLocalhost(string hostNameOrAddress) | |
{ | |
if (string.IsNullOrEmpty(hostNameOrAddress)) | |
return false; | |
try | |
{ | |
// get host IP addresses | |
IPAddress[] hostIPs = Dns.GetHostAddresses(hostNameOrAddress); | |
// get local IP addresses |
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 thumbnail bytes array | |
$userThumbnail = (Get-ADUser dmytro_mykhailov -Properties thumbnailPhoto).thumbnailPhoto; | |
#store bytes array into file | |
Set-Content -Value $userThumbnail -Encoding byte -Path thumbnail.png |
OlderNewer