Instantly share code, notes, and snippets.

View package.json
{
"name": "wd",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
View run-chromedriver-cluster.ps1
param (
[string]$instances = 10
)
docker rm -f selenium-hub
docker run --restart=always -d -p 4444:4444 --name selenium-hub selenium/hub:3.0.0-dubnium
$i=0
while($i -ne $instances)
{
View recursive NPM install.sh
#!/bin/bash
DIRS=$(find . -maxdepth 3 -name "package.json" -printf "%h\n")
for d in $DIRS
do
( cd $d && NPM i )
done
View notify.ps1
function Test-TeamCityBuildStatus
{
param
(
[string] $ServerUrl ="[TC server url]",
[string] $UserName = "[tc user]",
[string] $Password = "[TC password]",
[string] $BuildTypeId = "[build id]"
)
View check-site-alive.ps1
param (
[string]$url = "",
[int]$maxRetries = 5
)
$SecondsDelay = 10
$retrycount = 0
$completed = $false
View readme.md

install JDK

1.install chocolatey

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin

2.open new cmd window and run

View restore_sql_sb.cs
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Configuration;
using System.Data.SqlClient;
namespace Nvm.Web.FunctionalTests.Support
{
[TestClass]
public class Init
{