Skip to content

Instantly share code, notes, and snippets.

View balazsbajorics's full-sized avatar
🌈

Balazs Bajorics balazsbajorics

🌈
View GitHub Profile
@balazsbajorics
balazsbajorics / machine.js
Last active November 14, 2019 18:36
Generated by XState Viz: https://xstate.js.org/viz
const bundlerMachine = Machine({
id: 'bundlermachine',
type: 'parallel',
// the initial context. very similar to a redux-like state object.
// the context object is immutable, and you must use Actions (side effects) to change its value
// the Action to change the context's value is called `assign`. dont ask me why.
context: {
queuedUpdateFiles: {},
weWantToEmit: false,
@balazsbajorics
balazsbajorics / machine.js
Created November 14, 2019 17:13
Generated by XState Viz: https://xstate.js.org/viz
const bundlerMachine = Machine({
id: 'bundlermachine',
type: 'parallel',
context: {
queuedUpdateFiles: {},
weWantToEmit: false,
fileQueuedForProcessing: null,
},
states: {
@balazsbajorics
balazsbajorics / machine.js
Created November 14, 2019 15:43
Generated by XState Viz: https://xstate.js.org/viz
const bundlerMachine = Machine({
id: 'bundlermachine',
type: 'parallel',
context: {
queueLength: 0,
},
states: {
worker: {
initial: 'uninitialized',
@balazsbajorics
balazsbajorics / index.js
Created November 23, 2017 10:06
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var JSON = require("json5")
console.log(JSON.stringify({a: 'cica"'}, null, 2))
var YAML = require("js-yaml")

Keybase proof

I hereby claim:

  • I am balazsbajorics on github.
  • I am bayjorix (https://keybase.io/bayjorix) on keybase.
  • I have a public key ASDN0CuWRn7HFkjmsiSjc1xdOSeQ8e-bXnxTE8guVV9w8Ao

To claim this, I am signing this object:

@balazsbajorics
balazsbajorics / gist:98f4d51581c5221d1b41
Created October 4, 2014 13:11
List all available fonts in an iOS app written in Swift
for family in UIFont.familyNames()
{
if let family = family as? String
{
for font in UIFont.fontNamesForFamilyName(family)
{
println(font)
}
}
}