Skip to content

Instantly share code, notes, and snippets.

Jakub Fiala jakubfiala

Block or report user

Report or block jakubfiala

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jakubfiala
jakubfiala / boomerang.sh
Created Jul 25, 2018
A script to loop an mp4 video similarly to Instagram's boomerang
View boomerang.sh
#!/usr/bin/env bash
set -o errexit
set -o nounset
if [[ "$#" -ne 2 ]]; then
echo "Usage: ./boomerang.sh src_file out_file"
fi
SRC=$1
OUT=$2
@jakubfiala
jakubfiala / glslsandboxes
Created May 3, 2018
a list of my GLSL Sandbox sketches (ones I'm proud of anyway)
View glslsandboxes
http://glslsandbox.com/e#46760.1
View iterm_profile.json
{
"Badge Text" : "",
"Working Directory" : "\/Users\/jakub",
"Prompt Before Closing 2" : 0,
"Selected Text Color" : {
"Green Component" : 0,
"Blue Component" : 0,
"Red Component" : 0
},
"Rows" : 25,
View ohwell.sublime-snippet
<snippet>
<content><![CDATA[
¯\_(ツ)_/¯
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>ohwell</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
View .bashrc
export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
[ -z "$PS1" ] && return
export CLICOLOR=1
git_repo_name() {
git config remote.origin.url 2> /dev/null \
| grep -Poi '(?<=github.com/)(.*)'
}
@jakubfiala
jakubfiala / seq.js
Created Jan 17, 2018
Web Audio sequencing function
View seq.js
// creates a Sequence for the given AudioContext, which changes the `param` of the `node` according to a specified `seq` array with a given `smoothness`
// Example of a `seq` array:
// [ [0, 440], [1, 220], [1.5, 330], [2, 440] ]
// English: set the value to 440 immediately, then to 220 after 1 second, then to 330 after 1.5 seconds, then return to 440 after 2 seconds
//
// returns an object containing 3 methods:
//
// - `playOnce` will perform the sequence once
// - `loop` will loop the sequence indefinitely
// - `stop` will stop looping the sequence
@jakubfiala
jakubfiala / sequence.js
Last active Jun 20, 2017
A simple Web Audio sequencer function
View sequence.js
// creates a Sequence for the given AudioContext, which changes the `param` of the `node` according to a specified `seq` array with a given `smoothness`
// Example of a `seq` array:
// [ [0, 440], [1, 220], [1.5, 330], [2, 440] ]
// English: set the value to 440 immediately, then to 220 after 1 second, then to 330 after 1.5 seconds, then return to 440 after 2 seconds
//
// returns an object containing 3 methods:
//
// - `playOnce` will perform the sequence once
// - `loop` will loop the sequence indefinitely
// - `stop` will stop looping the sequence
@jakubfiala
jakubfiala / directories_model.graphql
Last active Nov 1, 2017
Example of creating data schemae using Google's protocol buffers and Facebook's GraphQL Schema Language
View directories_model.graphql
# this defines a new field type
scalar HTML
# this defines a new object type
type Institution {
# the ! denotes a required field
name: String!
location: String
}
@jakubfiala
jakubfiala / after_iter
Created May 27, 2017
strange Vec reversal after calling .iter()
View after_iter
After .iter():
[
0.02893070559670266,
0.02936703194102209,
0.030760184075799155,
0.033019285012034535,
0.03669432755302178,
0.041665175580908854,
0.048615361816985184,
@jakubfiala
jakubfiala / fractal.js
Created Mar 28, 2017
Fractal config where resources aren't being loaded
View fractal.js
const path = require('path');
const fractal = module.exports = require('@frctl/fractal').create();
const mandelbrot = require('@frctl/mandelbrot');
const TPLAdapter = require('./pattern-library/tpl-php-adapter.js');
// PROJECT VARS
fractal.set('project.title', 'Web Components');
fractal.set('project.version', 'v1.0');
fractal.set('project.author', 'Jakub Fiala');
You can’t perform that action at this time.