Skip to content

Instantly share code, notes, and snippets.

View jbowa's full-sized avatar

James jbowa

  • Shoreditch, London
View GitHub Profile
@jbowa
jbowa / golden_hour_code.go
Created January 18, 2024 11:24
Code used during golden hour
package main
import (
"errors"
"fmt"
"sync"
"time"
)
type (
@jbowa
jbowa / languages.json
Created August 3, 2022 11:47 — forked from akmandev/languages.json
Languages with alpha-2 codes and native names
[
{"code":"ab","name":"Abkhaz","nativeName":"аҧсуа"},
{"code":"aa","name":"Afar","nativeName":"Afaraf"},
{"code":"af","name":"Afrikaans","nativeName":"Afrikaans"},
{"code":"ak","name":"Akan","nativeName":"Akan"},
{"code":"sq","name":"Albanian","nativeName":"Shqip"},
{"code":"am","name":"Amharic","nativeName":"አማርኛ"},
{"code":"ar","name":"Arabic","nativeName":"العربية"},
{"code":"an","name":"Aragonese","nativeName":"Aragonés"},
{"code":"hy","name":"Armenian","nativeName":"Հայերեն"},
return block([
startClock(clock),
set(delta, diff(translationY)),
cond(
eq(gestureState, State.ACTIVE),
[
set(isSpringing, 0),
set(
state.position,
add(
import {useEffect} from 'react'
import Plyr, {SourceInfo, Options} from 'plyr'
import 'plyr/dist/plyr.css'
const usePlyr = (id: string, sources: SourceInfo, opts?: Options) => {
useEffect(() => {
const el = document.getElementById(id)
const player = new Plyr(el, opts)
player.source = sources
@jbowa
jbowa / cli.docker.sh
Created November 27, 2019 10:03 — forked from LeCoupa/cli.docker.sh
Docker Cheatsheet + Tips & Tricks --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
docker exec -it [container-id] bash # Enter a running container
docker ps # See a list of all running containers
docker stop <hash> # Gracefully stop the specified container
docker ps -a # See a list of all containers, even the ones not running
docker kill <hash> # Force shutdown of the specified container
docker rm <hash> # Remove the specified container from this machine
docker rm $(docker ps -a -q) # Remove all containers from this machine
@jbowa
jbowa / postgres-brew.md
Created November 26, 2019 11:24 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update