Sourced from https://github.com/jon-shipley/patterns/blob/master/mssql-idempotent-sql.md
This file contains hidden or 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
# misc/OS | |
alias ll='ls -GFhla' | |
alias showHidden='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app' | |
alias hideHidden='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app' | |
alias cdd='cd ~/dev/' | |
alias serve='python3 -m http.server' | |
# git | |
alias gs='git status ' | |
alias ga='git add .' |
This file contains hidden or 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 | |
set -e | |
if [ -z "$1" ] | |
then | |
echo "storage account name required" | |
exit 1 | |
fi | |
if [ -z "$2" ] |
This file contains hidden or 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
// decorator example | |
export interface IWork { | |
doWork (work: any): void | |
} | |
export class ImportantService implements IWork { | |
doWork (work: any): void { | |
// important work done here | |
} |
github...
sqlcmd -S <ip> -d <dbname> -U <username> -P <password> -I
This file contains hidden or 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
const checkMachine = Machine({ | |
id: 'check', | |
initial: 'untaken', | |
context: { | |
restarts: 0 | |
}, | |
states: { | |
untaken: { | |
on: { | |
ALLOCATE: 'allocated' |
This file contains hidden or 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
export class StorageService { | |
setItem (key: StorageKey, item: any): void { | |
localStorage.setItem(key.toString(), item) | |
} | |
} | |
export class StorageKey { | |
private key: string |
This file contains hidden or 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
#!/usr/bin/env bash | |
set -x | |
CWD=$(pwd) | |
# deploy app1 | |
ADMIN_APP="${CWD}/app1" | |
TEMP_DIR=$(mktemp -d) | |
cd ${TEMP_DIR} | |
cp -a "${ADMIN_APP}" . | |
cd admin |
This file contains hidden or 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 strict' | |
const https = require('https') | |
// set the id of your github PR label below... | |
const ciEnabledLabelId = 0 | |
const orgAndRepo = 'yourOrg/yourRepo' | |
// Example call: 'https://api.github.com/repos/myorg/myrepo/pulls/557?client_id=xxxx&client_secret=yyyy' | |
const pullRequestId = process.argv[2] | |
if (!pullRequestId) { |
This file contains hidden or 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 | |
# exit on error | |
set -e | |
# input parameters | |
# $1 resource group to target | |
# $2 cosmosDB instance name | |
# Set variables for the new account, database, and collection |
NewerOlder