Skip to content

Instantly share code, notes, and snippets.

View ptdel's full-sized avatar
😶‍🌫️

Patrick Delaney ptdel

😶‍🌫️
  • Pacific Northwest
View GitHub Profile
@ptdel
ptdel / clone-org.sh
Last active November 9, 2022 16:29
"Fork" all repositories from a public organization into a private organization
#!/usr/bin/env bash
## this script assumes that you have the GitHub CLI and jq installed.
## before you run this script you should run `gh auth status` to make sure that
## you are logged in, otherwise the script will not work.
while getopts ":t:f:n:" args; do
case $args in
t) TO_ORGANIZATION=$OPTARG;;
f) FROM_ORGANIZATION=$OPTARG;;
@ptdel
ptdel / tasks.json
Created October 27, 2022 18:24
VSCode TypeScript NestJS Tasks Profile
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start:debug",
"group": "build",
"problemMatcher": [],
"label": "beginDebug",
"detail": "nest start --debug --watch"
@ptdel
ptdel / launch.json
Created October 27, 2022 18:23
VSCode TypeScript NestJS Launch Profile
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Nest Framework",
"args": [
"${workspaceFolder}/src/main.ts"
],
a4b.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
apigateway.amazonaws.com
application-autoscaling.amazonaws.com
appstream.application-autoscaling.amazonaws.com
appsync.amazonaws.com
@ptdel
ptdel / from_json.sql
Last active February 24, 2021 22:27
load JSON into table with GUID primary key
DECLARE @json NVARCHAR(MAX) = N'{"json":"here"}';
INSERT INTO tableName (Id, columnA, columnB, ...)
SELECT NEWID(), * FROM OPENJSON(@json)
WITH (
columnA VARCHAR(255) '$.columnA',
columnB VARCHAR(255) '$.columnB',
...
)
@ptdel
ptdel / nuget-update.sh
Last active August 11, 2020 17:58
script for linux to download all nuget package dependencies for a project.
#!/bin/bash
# downloads all dependencies for a project via nuget.
# useful for vscode users on linux.
regex='PackageReference Include="([^"]*)" Version="([^"]*)"'
find . -name "*.*proj" | while read proj
do
while read line
do
@ptdel
ptdel / all_iam_actions.txt
Created June 28, 2019 18:02
Every Single AWS IAM Action key/value pair (as of 6/28/2019)
[
'account:DisableRegion',
'account:EnableRegion',
'account:ListRegions',
'a4b:ApproveSkill',
'a4b:AssociateContactWithAddressBook',
'a4b:AssociateDeviceWithRoom',
'a4b:AssociateSkillGroupWithRoom',
'a4b:AssociateSkillWithSkillGroup',
'a4b:AssociateSkillWithUsers',