Skip to content

Instantly share code, notes, and snippets.

View sixty-nine's full-sized avatar

Dan sixty-nine

  • 0.0.0.0:69
View GitHub Profile
@sixty-nine
sixty-nine / README.md
Last active March 14, 2021 09:37
Nuxt Typescript plugin for Supabase Auth

Nuxt Typescript plugin for Supabase Auth.

Inspired by this tweet and this repo.

Install

yarn add @supabase/supabase-js
/*
What was that rule about semi-colons on line start?!
At least I remember to put the curly braces on the same line..
Am I a bad person?
*/
class TypeNamesStrategy {
getNames = () => ['array', 'string']
}
const getDefaultValues = (s) => {
@sixty-nine
sixty-nine / Create DB and user
Last active July 17, 2019 20:57
I am not a 10X dev, I will never remember this one...
CREATE DATABASE `playground`;
CREATE USER 'playground' IDENTIFIED BY '123123';
GRANT ALL privileges ON `mydb`.* TO 'playground'@localhost;
FLUSH PRIVILEGES;
sudo docker inspect --format '{{ .NetworkSettings.IPAddress }}' $(sudo docker container ls | grep mariadb | cut -f1 -d\ )
@sixty-nine
sixty-nine / index.tsx
Created January 27, 2019 22:59
My react cheat sheet
import * as React from 'react';
// --- Component ----------------------------------------------------------------------------------
type HelloProps = {};
type HelloState = {};
class Hello extends React.Component<HelloProps, HelloState> {
readonly state = {};

Please be kind to each other, you always should, not only when you participate in this project.

#!/bin/bash
function git-oops() {
git add .
git ci -m 'oops'
git rebase -i HEAD~2
}
@sixty-nine
sixty-nine / debug.scss
Last active June 24, 2016 09:18
Debug media queries
$DEBUG: true;
@mixin debug($message) {
@if ($DEBUG == true) {
body::before {
content: $message;
}
}
}