Skip to content

Instantly share code, notes, and snippets.


Sébastien Stormacq sebsto

View GitHub Profile
sebsto / gist:b53e61c5c8cfc38ad87289dd089b8174
Created Apr 6, 2022
To mount an APS volume on Ubuntu
View gist:b53e61c5c8cfc38ad87289dd089b8174
# build Fuse from the source
mkdir -pv ~/src && cd ~/src
git clone
cd apfs-fuse
git submodule init
git submodule update
mkdir build
cd build
sebsto / gist:6af5bf3acaf25c00dd938c3bbe722cc1
Last active Jun 15, 2022
Start VNCServer on Mac1 EC2 Instance
View gist:6af5bf3acaf25c00dd938c3bbe722cc1
# YouTube (english) :
# YouTube (french) :
# On your laptop, connect to the Mac instance with SSH (similar to Linux instances)
ssh -i <your private key.pem> ec2-user@<your public ip address>
# On the Mac
# inspired by
# and
from time import time
import json
import os
from jwcrypto import jwk, jwt, jws
import requests
# 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):
View Queue.swift
// Queue.swift
// An implemntation of a thread safe FIFO queue in Swift
// inspired by
View gist:a81db362d06f5d7b3afc65b4c19048a3
// 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
sebsto /
Created Apr 28, 2020
Delete Amlify Console App after `amplify delete`
APP_ID=$(aws amplify list-apps --query 'apps[? ! contains(keys(@), `productionBranch`) == `true`].[appId]' --output text )
echo $APP_ID | while read appid
aws amplify delete-app --app-id $appid
sebsto / gist:2ce59d80a3b5d30bb1ee456e96bf0fb0
Last active Feb 11, 2022
Redshift Materialized View Demo
View gist:2ce59d80a3b5d30bb1ee456e96bf0fb0
drop table store;
drop table sales;
drop materialized view city_sales;
CREATE TABLE "sales" (
"id" int PRIMARY KEY,
"item" varchar,
sebsto /
Created Nov 21, 2019
Delete Log groups
for NAME in $(aws logs describe-log-groups | jq -r .logGroups[].logGroupName | grep amplifynotes)
aws logs delete-log-group --log-group-name $NAME
sebsto /
Created Nov 15, 2019
Amazon S3 - List all your buckets (aka 'ls' command)
import boto3
s3 = boto3.resource('s3')
for bucket in s3.buckets.all():