Skip to content

Instantly share code, notes, and snippets.

View jemgold's full-sized avatar
👽
vibing

Jem jemgold

👽
vibing
View GitHub Profile
@jemgold
jemgold / machine.js
Created November 15, 2019 19:34
Generated by XState Viz: https://xstate.js.org/viz
const cameraMachine = new Machine({
id: 'camera',
initial: 'requestPermissions',
context: {
camera: null,
videoUri: null,
},
states: {
requestPermissions: {
initial: 'pending',
@jemgold
jemgold / machine.js
Created November 15, 2019 19:32
Generated by XState Viz: https://xstate.js.org/viz
const videoUri = 'foo';
const createReviewMachine = new Machine({
id: 'review',
type: 'parallel',
context: {
video: null,
videoUri,
duration: 0,

https://www.youtube.com/watch?v=0zp-yKeFRTE

Now I consider that I myself I’m a successful man in business. I hate business. I hate everything to do with it; accounting, figuring, adding up numbers, because they’re all arid. They don’t smell of anything – sometimes there’s an interesting smell to the ink on a checkbook – but by and large all this figuring is a completely colourless occupation. I don’t like it, so I have to hand it over to accountants and lawyers and the people who seem to like it. But I don’t know whether they really do?

The essential principle of business of occupation in the world is this: figure out some way in which you get paid for playing.

When I was quite young – I forget the exact age – I made a solemn vow which was that I would never accept a job, I would always be my own employer. And curiously, there are very few roles in life which provide this possibility: the successful artist, writer and sometimes musician, sometimes the independent consultant, can occupy this role – I mean h

@jemgold
jemgold / classWithIvar.cocoascript.js
Last active March 21, 2017 05:04 — forked from darknoon/classWithIvar.cocoascript.js
You can use ivars so you don't need to make so many hilarious classes
class Class {
constructor(ivars = []) {
const uniqueClassName = "fetchDelegate_" + NSUUID.UUID().UUIDString();
const cls = MOClassDescription.allocateDescriptionForClassWithName_superclass_(uniqueClassName, NSObject);
const prototype = Object.getPrototypeOf(this);
Object.getOwnPropertyNames(prototype).forEach(prop => {
console.log(prop);
const sel = NSSelectorFromString(prop);
cls.addInstanceMethodWithSelector_function_(sel, prototype[prop]);
@jemgold
jemgold / classWithIvar.cocoascript.js
Created March 21, 2017 04:59 — forked from darknoon/classWithIvar.cocoascript.js
You can use ivars so you don't need to make so many hilarious classes
// Make a class with some handlers.
function Class(handlers){
var uniqueClassName = "fetchDelegate_" + NSUUID.UUID().UUIDString();
var cls = MOClassDescription.allocateDescriptionForClassWithName_superclass_(uniqueClassName, NSObject);
// Add each handler to the class description
for(var selectorString in handlers) {
var sel = NSSelectorFromString(selectorString);
cls.addInstanceMethodWithSelector_function_(sel, handlers[selectorString]);
}
// Add ivar to store instance-specific info
### Keybase proof
I hereby claim:
* I am jongold on github.
* I am gold (https://keybase.io/gold) on keybase.
* I have a public key ASDVO2aXukJHlPFfrT2O_-GRHfwLPHVeRqhj7UGLswrsFgo
To claim this, I am signing this object:
@jemgold
jemgold / stylin.jsx
Last active September 9, 2016 20:22
// stylez.js
// colors :: Style
export const colors = {
black: '#000',
white: '#fff',
}
// or
// bgBlack :: Style
export const bgBlack = {
{
"styles": {
"html": {
"box-sizing": "border-box"
},
"body": {
"box-sizing": "border-box"
},
"article": {
"box-sizing": "border-box"
viewBookList bookList =
bookList
|> List.map viewBook
|> div [ class "container" ]
viewBookList bookList =
div
[ class "container" ]
(List.map viewBook bookList)
@jemgold
jemgold / ShareButton.jsx
Created May 17, 2016 16:54 — forked from jamesslock/ShareButton.jsx
ReactJS Share Buttons
import React, { PropTypes } from 'react';
import Button from '../components/Button.jsx';
import Icon from '../components/Icon.jsx';
module.exports = React.createClass({
render: function () {
const {
className,
classNameIcon,
children,