Skip to content

Instantly share code, notes, and snippets.

View NorseGaud's full-sized avatar

Nathan NorseGaud

View GitHub Profile
@bjollans
bjollans / App.tsx
Last active April 29, 2024 05:53
Minimal version to get Google Sign in working with Supabase on IOS in React Native with Expo. If you are not using Expo, follow the setup guide of `react-native-app-auth` instead of using `rn-app-auth-plugin.js` and `app.json`.
import { Session } from '@supabase/supabase-js';
import supabase from './util/supabase';
import { useEffect, useState } from 'react';
import AuthForm from './components/AuthForm';
export default function App() {
const [session, setSession] = useState<Session | null>(null)
useEffect(() => {
supabase.auth.getSession().then(({ data: { session } }) => {
@balupton
balupton / README.md
Last active September 1, 2023 20:22
Stack Overflow Question 76861137 — How to prevent nested function failures being missed in bash?

Exit Status and Bash

I'm @balupton, author of dorothy which is the largest public bash codebase that I am aware of.

Dorothy is coded using set -e (errexit) to avoid || return $? statements on every single one of its thousands of lines of code, for the most part this has worked well, however I was suprised when the down command would report a failure via:

However it would also report a success within the called function:

@nickistre
nickistre / docker-reset-full-single-line.sh
Last active July 24, 2023 22:45
Reset Docker environment
#!/usr/bin/env bash
# All in one line
docker stop $(docker ps -q) ; docker rm $(docker ps -aq) ; docker rmi -f $(docker images -q) ; docker volume prune -f ; docker network prune -f ; docker system prune -a --volumes -f
@npearce
npearce / install-docker.md
Last active May 11, 2024 10:33
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@Saissaken
Saissaken / Update git fork with tags.sh
Last active April 20, 2024 18:10
Update git fork with tags
# Repo: someuser/myframework
# Fork: superteam/myframework
# Track:
git clone https://github.com/superteam/myframework.git
cd myframework
git remote add upstream https://github.com/someuser/myframework.git
# Update:
git fetch upstream