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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: Template which deploys a basic VPC with a single SG, 2 public subnets and an IGW. Optionally can also deploy 2 private subnets and a NAT gateway | |
Parameters: | |
Subnet1AzParameter: | |
Type: AWS::EC2::AvailabilityZone::Name | |
Description: First subnet avalibility zone | |
Subnet2AzParameter: | |
Type: AWS::EC2::AvailabilityZone::Name | |
Description: Second subnet avalibility zone |
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
Show hidden characters
// I'm tired of extensions that automatically: | |
// - show welcome pages / walkthroughs | |
// - show release notes | |
// - send telemetry | |
// - recommend things | |
// | |
// This disables all of that stuff. | |
// If you have more config, leave a comment so I can add it!! | |
{ |
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
import linecache | |
import re | |
import sys | |
from types import TracebackType | |
from typing import Any, Dict, List, Optional | |
PACKAGE_PATH_PATTERN = r'.*/lib/python.*/site-packages/.*' | |
class TracebackLogger: |
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
#!/usr/bin/env python | |
"""Extend Python's built in HTTP server to save files | |
curl or wget can be used to send files with options similar to the following | |
curl -X PUT --upload-file somefile.txt http://localhost:8000 | |
wget -O- --method=PUT --body-file=somefile.txt http://localhost:8000/somefile.txt | |
__Note__: curl automatically appends the filename onto the end of the URL so |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"os" | |
"time" | |
"github.com/aws/aws-sdk-go-v2/aws" |
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
#!/usr/bin/env bash | |
# Usage: | |
# - Install `tesseract` with `brew install tesseract` | |
# - In BetterTouchTool, create a trigger of your choice. | |
# (I recommend a Keyboard Shortcut with Cmd+Shift 6) | |
# - Add an Execute Shell Script / Task action | |
# - Paste this script. | |
# NOTE: You'll need to authorize BTT to the Screen Recording permission in Security and Privacy at System Preferences |
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
URI = "https://www.16personalities.com/free-personality-test" | |
from selenium.webdriver import Chrome, ChromeOptions | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.common.by import By |
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
library(tidyverse) | |
geomid <- function(lat, lon) | |
{ | |
# http://www.geomidpoint.com/calculation.html | |
lat <- lat * pi / 180 | |
lon <- lon * pi / 180 | |
x <- mean(sum(cos(lat) * cos(lon))) | |
y <- mean(sum(cos(lat) * sin(lon))) | |
z <- mean(sum(sin(lat))) |
NewerOlder