Skip to content

Instantly share code, notes, and snippets.

@bodhi
bodhi / main.go
Created July 6, 2020 03:09
Paseto scratch
import (
"fmt"
"time"
paseto "github.com/o1egl/paseto/v2"
)
func main() {
key := []byte("YELLOW SUBMARINE, BLACK WIZARDRY")
Processing
Waiting
fetch -> Fetching
Fetching
processed -> Done
error -> Error
not processed -> Waiting
Done
Ordering&
Browser
PDP
add to cart -> PDP
buy -> Fulfilment
checkout -> Fulfilment
Fulfilment
confirm -> Check-in
Check-in
@bodhi
bodhi / SketchSystems.spec
Last active November 1, 2019 06:08
App&
App&
Content
Stores
pick store -> Categories
Categories
pick category -> Product List
back to store list -> Stores
Product List
choose product -> Product
back to categories -> Categories
@bodhi
bodhi / Dockerfile
Created May 22, 2019 00:18
Burn git commit SHA into docker image
FROM golang:1.12 AS build
COPY ./main.go .
# ARG here is to make the sha available for use in -ldflags
ARG GIT_SHA
# -ldflags "-X main.sha=${GIT_SHA}" allows main.sha to be set at build time
RUN go build -ldflags "-X main.sha=${GIT_SHA}" -o /app
FROM scratch
@bodhi
bodhi / patch.md
Created December 18, 2018 00:53
Patch for broken remotedev server

in node_modules/remotedev-server/index.js

   var options = assign(getOptions(argv), {
     workerController: __dirname + "/lib/worker.js",
-    allowClientPublish: false
+    allowClientPublish: false,
+    wsEngine: "ws"
  });
@bodhi
bodhi / Camera.png
Last active November 2, 2018 06:24
# type: screen
Camera.png
@bodhi
bodhi / locale.js
Created April 23, 2017 14:16
Define exact map using instance as reference.
/* @flow */
const messages = {
"a": "A",
"b": "B",
}
type Locale_ = typeof messages
type Key = $Keys<Locale_>
@bodhi
bodhi / Native.js
Last active February 12, 2017 11:21
React Native backend for Pux
"use strict";
var React = require("react");
var ReactNative = require("react-native")
var AppRegistry = ReactNative.AppRegistry;
function reactClass(htmlSignal) {
return React.createClass({
componentWillMount: function () {
var ctx = this;

Keybase proof

I hereby claim:

  • I am bodhi on github.
  • I am bodhi (https://keybase.io/bodhi) on keybase.
  • I have a public key whose fingerprint is 013E 68D5 5E82 4155 7761 DC57 82C2 8863 5DD5 5FF3

To claim this, I am signing this object: