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/sh | |
### | |
### Payload script | |
### | |
CURRENT_USER=$(whoami) | |
echo "Hello from shell script as user: \"$CURRENT_USER\"" | |
exit 0 |
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 table store; | |
drop table sales; | |
drop materialized view city_sales; | |
CREATE TABLE "sales" ( | |
"id" int PRIMARY KEY, | |
"item" varchar, |
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
// inspired by https://www.appcoda.com/swiftui-animation-basics-building-a-loading-indicator/ | |
import SwiftUI | |
struct LoadingCircleView: View { | |
@State private var isLoading = false | |
var body: some View { | |
ZStack { | |
Circle() |
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
# | |
# This is an example of an AWS Lambda function implementing a Cognito CUSTOM_AUTH flow. | |
# The custom auth flow accepts a JWT token a sole credentials and returns AUTHENTICATED when | |
# the JWT token is valid | |
# | |
import os | |
from utils import jwt_apple | |
def define_auth_challenge(event): |
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
# Download the VDI from https://cdn.amazonlinux.com/os-images/latest/ | |
# Doc is at http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-2-virtual-machine.html | |
# Be sure you have config/meta-data and config/user-data ready as per the below | |
# change ec2-user's password to your password | |
$ cat config/meta-data | |
local-hostname: amazonlinux.onprem | |
# eth0 is the default network interface enabled in the image. You can configure |
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
# build Fuse from the source | |
mkdir -pv ~/src && cd ~/src | |
git clone https://github.com/sgan81/apfs-fuse.git | |
cd apfs-fuse | |
git submodule init | |
git submodule update | |
mkdir build | |
cd build |
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
# inspired by https://gist.github.com/davidhariri/b053787aabc9a8a9cc0893244e1549fe | |
# and https://sarunw.com/posts/sign-in-with-apple-3/ | |
from time import time | |
import json | |
import os | |
from jwcrypto import jwk, jwt, jws | |
import requests |
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
aws support describe-trusted-advisor-check-result --check-id eW7HH0l7J9 --query 'result.sort_by(flaggedResources[?status!="ok"],&metadata[2])[].metadata' --output table --region us-east-1 |
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
// | |
// Queue.swift | |
// | |
// An implemntation of a thread safe FIFO queue in Swift | |
// | |
// inspired by | |
// https://medium.com/@dmytro.anokhin/concurrency-in-swift-reader-writer-lock-4f255ae73422 | |
// https://www.mikeash.com/pyblog/friday-qa-2011-10-14-whats-new-in-gcd.html | |
// https://benoitpasquier.com/data-structure-implement-queue-swift/ |
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
// specific for my Data Model to unblock me. | |
// only tested on queries. | |
➜ Landmarks diff -c /Users/stormacq/Documents/amazon/code/amplify/amplify-ios//Amplify/Categories/DataStore/Model/Schema/ModelSchema+Definition.swift ./Pods/Amplify/Amplify/Categories/DataStore/Model/Schema/ModelSchema+Definition.swift | |
*** /Users/stormacq/Documents/amazon/code/amplify/amplify-ios//Amplify/Categories/DataStore/Model/Schema/ModelSchema+Definition.swift Sat Jun 6 08:29:27 2020 | |
--- ./Pods/Amplify/Amplify/Categories/DataStore/Model/Schema/ModelSchema+Definition.swift Sat Jun 6 08:49:47 2020 | |
*************** | |
*** 31,36 **** | |
--- 31,45 ---- | |
return false |