Skip to content

Instantly share code, notes, and snippets.

View Get-AksSupportedVersions
$header = @"
h1 {
font-family: Arial, Helvetica, sans-serif;
color: #296940;
font-size: 28px;
h2 {
font-family: Arial, Helvetica, sans-serif;
ashtewari / azure-ad-login.js
Last active Jul 30, 2019
Protractor script for Azure AD Login
View azure-ad-login.js
Usage :
Execute protractor on command line
protractor e2e.conf.js --params.url= --params.pwd=PASSWORD
Sample spec file
var AzureAdLogin = require('./azure-ad-login');
View simplebank.sol
pragma solidity ^0.4.24;
contract SimpleBank {
mapping (address => uint) private balances;
event LogDepositMade(address accountAddress, uint amount);
address public owner;
View simplebank-destructible.sol
pragma solidity ^0.4.24;
import "";
contract SimpleBank is Destructible {
mapping (address => uint) private balances;
address public owner;
View create-bacpac.ps1
Visual Studio 2015 build creates a dacpac file, but Azure Resource Manager templates can use only bacpac files.
This powershell script automates creation of bacpac and publishing to the blob storage.
After building the data project, open a command prompt on the folder containing the dacpac file.
Copy this script to the same folder.
You need :
1. Name of the localdb server where the dacpac is published ((localdb)\ProjectsV13)
View Search-Splunk-Using-Powershell.ps1
$lastDay = ( get-date ).addDays( -1 ).toString( s );
$lastHour = ( get-date ).addMinutes( -60 ).toString( s );
$searches = @(
, "source=""*"" ERROR"
, "CreditDoesNotMatch"
,"source=""\\www3/access.log"" productId=WC-SH-G04"
View dabblet.css
.speech-bubble {
font:40px/100px Arial, sans-serif;
position: absolute;
ashtewari / TestSignedXml.js
Last active Dec 20, 2015
nodeunit unit test for validating xml-crypto generated signed xml.
View TestSignedXml.js
var testrunner = require('nodeunit').reporters.default;
exports.testSignedXml = function(test){
var SignedXml = require('xml-crypto').SignedXml
, fs = require('fs')
, dom = require('xmldom').DOMParser;
View list-of-datetimeoffset-columns
/* List all columns in the current database that are of datetimeoffset datatype */
Use $(DbName)
SELECT c.Object_ID
, AS ColumnName
,SCHEMA_NAME(t.schema_id) AS SchemaName
ashtewari / gist:5091144
Created Mar 5, 2013
Unit test fails because TimeZoneInfo does not use the correct DST transitions.
View gist:5091144
/// <summary>
/// Is the specified datetime DST?
/// </summary>
public void DST_Started_On_April_27_1980()
var ts = new DateTime(1980, 4, 15, 12, 0, 0);
var isDst = Utils.EasternTimeZone.IsDaylightSavingTime(ts);