Preprocessing
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
foreach ($location in @('EastUS')) { | |
Get-AzVmSize -Location $location | % { | |
New-Object -TypeName PSobject -Property @{ | |
Name = $_.Name; | |
NumberOfCores = $_.NumberOfCores; | |
MemoryInMB = $_.MemoryInMB; | |
MaxDataDiskCount = $_.MaxDataDiskCount; | |
OSDiskSizeInMB = $_.OSDiskSizeInMB; | |
ResourceDiskSizeInMB = $_.ResourceDiskSizeInMB; | |
Family = $(switch -regex ($_.Name) { |
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
#requires -module msterminalsettings,threadjob | |
###QUICKSTART | |
#FIRST: Run this in your Powershell Windows Terminal: Install-Module threadjob,msterminalsettings -scope currentuser | |
#THEN: iex (iwr git.io/invoketerminalgif) | |
#THEN: Get-Help Search-Giphy -Examples | |
#THEN: Get-Help Invoke-TerminalGif -Examples | |
#THEN: Search-Giphy | Format-List -prop * | |
#THEN: Invoke-TerminalGif https://media.giphy.com/media/g9582DNuQppxC/giphy.gif |
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
{ | |
"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393215}", | |
"initialRows": 30, | |
"initialCols": 120, | |
"alwaysShowTabs": true, | |
"showTerminalTitleInTitlebar": true, | |
"experimental_showTabsInTitlebar": true, | |
"requestedTheme": "dark", | |
"profiles": [ | |
{ |
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 | |
#while true; do if [[ "$(hg pull --rebase https://hg.mozilla.org/mozilla-central)" != *"no changes found"* ]]; then if [ $? -eq 0 ]; then hg push try -f; else echo "manual merge required"; exit; fi; else echo "no changes found"; fi; sleep 600; done | |
while true; do | |
if [[ "$(hg pull --rebase https://hg.mozilla.org/mozilla-central)" != *"no changes found"* ]]; then | |
if [ $? -eq 0 ]; then | |
hg push try -f | |
else | |
echo "manual merge required" |
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
{ | |
"python": { | |
"library": "import json\ndef black_reformat(cell_text):\n import black\n import re\n cell_text = re.sub('^%', '#%#', cell_text, flags=re.M)\n try:\n reformated_text = black.format_str(cell_text, 88)\n except TypeError:\n reformated_text = black.format_str(cell_text, mode=black.FileMode(line_length=88))\n return re.sub('^#%#', '%', reformated_text, flags=re.M)", | |
"prefix": "print(json.dumps(black_reformat(u", | |
"postfix": ")))" | |
}, | |
"r": { | |
"library": "library(formatR)\nlibrary(jsonlite)", | |
"prefix": "cat(toJSON(paste(tidy_source(text=", | |
"postfix": ", output=FALSE)[['text.tidy']], collapse='\n')))" |
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
FROM python:3 | |
WORKDIR /usr/src/app | |
# Copy over the drivers | |
# MySQL ODBC Ansi | |
COPY drivers/mysql-connector-odbc-5.3.9-linux-ubuntu16.04-x86-64bit.tar.gz . | |
# Oracle 11.2 | |
COPY drivers/oracle-instantclient11.2-basic-11.2.0.4.0-1.x86_64.rpm . | |
COPY drivers/oracle-instantclient11.2-odbc-11.2.0.4.0-1.x86_64.rpm . |
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
# One liner | |
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
# Explained | |
wget \ | |
--recursive \ # Download the whole site. | |
--page-requisites \ # Get all assets/elements (CSS/JS/images). | |
--adjust-extension \ # Save files with .html on the end. | |
--span-hosts \ # Include necessary assets from offsite as well. | |
--convert-links \ # Update links to still work in the static version. |
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
DROP DATABASE IF EXISTS 📚; | |
CREATE DATABASE 📚; | |
USE 📚; | |
CREATE TABLE 👤( | |
🔑 INTEGER PRIMARY KEY, | |
🗣 varchar(64), -- name | |
🗓 DATE -- date of registration |