Skip to content

Instantly share code, notes, and snippets.

$header = @"
<style>
h1 {
font-family: Arial, Helvetica, sans-serif;
color: #296940;
font-size: 28px;
}
h2 {
font-family: Arial, Helvetica, sans-serif;
@ashtewari
ashtewari / SepoliaWhale.md
Created September 5, 2022 02:25 — forked from yorickdowne/SepoliaWhale.md
Get that sweet Sepolia ETH

Sepolia is now on PoS

As of 2022/7/6, Sepolia has switched to PoS. The window to do some mining has closed.

Testnets after merge (original, old content from here)

It's mid 2022, Ethereum is still PoW and motoring towards merge / PoS. Surviving testnets will be Sepolia - currently PoW - and Goerli. Ropsten will be merged and then deprecated, Rinkeby and Kovan won't be merged.

I want to "get ready" for some Sepolia testing pre- and post-merge. Sepolia will not have a public validator set; testing post-merge will be limited to running applications on it. As Sepolia is PoW, I can actually go mine myself some SepplETH. Here's how.

@ashtewari
ashtewari / azure-ad-login.js
Last active July 30, 2019 09:43
Protractor script for Azure AD Login
/*
Usage :
Execute protractor on command line
==================================
protractor e2e.conf.js --params.url= https://ABCD.azurewebsites.net/ --params.uid=user@ORGANIZATION.onmicrosoft.com --params.pwd=PASSWORD
Sample spec file
==================================
var AzureAdLogin = require('./azure-ad-login');
pragma solidity ^0.4.24;
contract SimpleBank {
mapping (address => uint) private balances;
event LogDepositMade(address accountAddress, uint amount);
address public owner;
pragma solidity ^0.4.24;
import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/lifecycle/Destructible.sol";
contract SimpleBank is Destructible {
mapping (address => uint) private balances;
address public owner;
<#
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)
$lastDay = ( get-date ).addDays( -1 ).toString( ‘s’ );
$lastHour = ( get-date ).addMinutes( -60 ).toString( ‘s’ );
$searches = @(
"ERROR"
, "source=""tutorialdata.zip:*"" ERROR"
, "CreditDoesNotMatch"
,"source=""tutorialdata.zip:.\\www3/access.log"" productId=WC-SH-G04"
)
@ashtewari
ashtewari / dabblet.css
Created December 11, 2013 16:05
Untitled
/*final-css*/
.speech-bubble {
text-align:center;
font:40px/100px Arial, sans-serif;
color:#fff;
background:red;
width:300px;
height:100px;
margin:auto;
position: absolute;
@ashtewari
ashtewari / TestSignedXml.js
Last active December 20, 2015 20:59
nodeunit unit test for validating xml-crypto generated signed xml.
var testrunner = require('nodeunit').reporters.default;
process.chdir(__dirname);
testrunner.run(['.']);
exports.testSignedXml = function(test){
var SignedXml = require('xml-crypto').SignedXml
, fs = require('fs')
, dom = require('xmldom').DOMParser;
/* List all columns in the current database that are of datetimeoffset datatype */
Use $(DbName)
go
SELECT c.Object_ID
, OBJECT_NAME(c.OBJECT_ID) TableName
,c.name AS ColumnName
,SCHEMA_NAME(t.schema_id) AS SchemaName