Skip to content

Instantly share code, notes, and snippets.

Avatar

Jan Vlnas jnv

View GitHub Profile
@jnv
jnv / output.txt
Created October 26, 2018 11:33
BakeryJS Example Output
View output.txt
$ node index.js
dispatch on flow description:
building flow from SchemaObject
* process **********************************************************************
* SERIAL -----------------------------------------------------------------------
* | CONCURRENT -----------------------------------------------------------------
* | - helloworld
* | ----------------------------------------------------------------------------
* | CONCURRENT -----------------------------------------------------------------
* | - wordcount
@jnv
jnv / index.js
Created October 26, 2018 11:06
BakeryJS Example Program
View index.js
const {Program} = require('bakeryjs');
const program = new Program(
// ServiceProvider
{},
// Program options
{
componentPaths: [`${__dirname}/components/`],
}
);
@jnv
jnv / helloworld.js
Created October 26, 2018 10:50
BakeryJS Example Component (helloworld.js)
View helloworld.js
const {boxFactory} = require('bakeryjs');
// Just a helper to throttle emitting
const {promisify} = require('util');
const timeout = promisify(setTimeout);
module.exports = boxFactory(
'helloworld',
{
@jnv
jnv / wordcount.js
Last active October 26, 2018 10:49
BakeryJS Example Component (wordcount)
View wordcount.js
const {boxFactory} = require('bakeryjs');
module.exports = boxFactory(
// name
'wordcount',
// metadata
{
provides: ['words'],
requires: ['text'],
emits: [],
@jnv
jnv / SBKS_CLA.md
Last active August 6, 2018 12:53 — forked from vorcigernix/cla.html
Socialbakers CLA
View SBKS_CLA.md

Fiduciary License Agreement 2.0

based on the

Individual Contributor exclusive License Agreement (including the Traditional Patent License OPTION)

Thank you for your interest in contributing to Socialbakers's Socialbakers Open Community ("We" or "Us").

The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us. To make this document effective, please follow the instructions at ____________________.

@jnv
jnv / fbai_copy_likes.user.js
Last active November 6, 2017 14:28
[Facebook Audience Insights: Copy Page Likes] #sb #userscripts
View fbai_copy_likes.user.js
// ==UserScript==
// @id fbaicopylikes@jnv.github.io
// @name Facebook Audience Insights: Copy Page Likes
// @namespace https://jnv.github.io
// @version 2017.10.11
// @description Copy Page Likes table in Facebook Audience Insights
// @author Jan Vlnas
// @match https://www.facebook.com/ads/audience-insights/*
// @grant GM_setClipboard
// @run-at document-idle
@jnv
jnv / gist:7fbcd91e1ec0b525c56312e18ac9f4b5
Created September 8, 2017 09:46 — forked from karlwestin/gist:3487951
Handlebars logging - tips for debugging templates!
View gist:7fbcd91e1ec0b525c56312e18ac9f4b5
/*
* Use this to turn on logging: (in your local extensions file)
*/
Handlebars.logger.log = function(level) {
if(level >= Handlebars.logger.level) {
console.log.apply(console, [].concat(["Handlebars: "], _.toArray(arguments)));
}
};
// DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3,
View compare_csv_dump.rb
#!/usr/bin/env ruby
require 'csv-diff'
require 'pp'
file1 = ARGV[0]
file2 = ARGV[1]
IGNORE = ['created_at', 'updated_at', 'deleted_at']
COMMON_PARAMS = {
ignore_moves: true,
@jnv
jnv / .gitignore
Last active March 23, 2017 13:29
View .gitignore
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
View bundlestars_bulk_keys.user.js
// ==UserScript==
// @name Reveal and Copy Steam Keys
// @namespace http://jnv.github.io
// @include https://www.bundlestars.com/*/orders/*
// @version 1
// @grant none
// @domain www.bundlestars.com
// @run-at document-idle
// ==/UserScript==