Skip to content

Instantly share code, notes, and snippets.

View niieani's full-sized avatar

Bazyli Brzóska niieani

View GitHub Profile
@niieani
niieani / gist:acd1ed750a55d05388434791dc3cfa60
Created November 6, 2016 15:59 — forked from mbixby/gist:3dae2026a77a9a3d3de9
Webpack Named Modules Plugin
var RequestShortener = require("webpack/lib/RequestShortener");
var _ = require("lodash");
/**
* TODO Docs
* @example new NamedModulesPlugin(/^\.\/app\/(viewmodels|records|adapters)/, /^\.\/app\/(.*)\.js$/)
*/
function NamedModulesPlugin(fileWhitelistRegex, replacementRegex) {
this.fileWhitelistRegex = fileWhitelistRegex;
this.replacementRegex = replacementRegex;
@niieani
niieani / throttle-and-debounce.sh
Last active December 11, 2023 15:39
throttle and debounce commands in bash
#!/usr/bin/env bash
declare -i last_called=0
declare -i throttle_by=2
@throttle() {
local -i now=$(date +%s)
if (($now - $last_called >= $throttle_by))
then
"$@"
@niieani
niieani / # opam - 2016-09-03_17-31-47.txt
Created September 3, 2016 15:32
opam on Mac OS X 10.12 - Homebrew build logs
Homebrew build logs for opam on Mac OS X 10.12
Build date: 2016-09-03 17:31:47
@niieani
niieani / # opam - 2016-09-03_17-10-13.txt
Created September 3, 2016 15:11
opam on Mac OS X 10.12 - Homebrew build logs
Homebrew build logs for opam on Mac OS X 10.12
Build date: 2016-09-03 17:10:13
@niieani
niieani / index.html
Last active July 31, 2016 15:44
Scroll Wheel Pass-through
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="fixed">mouse wheel over this fixed content</div>
<div id="container">
@niieani
niieani / README.md
Last active July 20, 2016 19:38
Installing and using lut_to_lut from ColorPipe-tools under Mac OS X

Installing and using lut_to_lut from ColorPipe-tools under Mac OS X

# install dependencies:
brew install homebrew/python/numpy homebrew/python/scipy
brew install opencolorio --with-python
git clone https://github.com/mikrosimage/ColorPipe-tools
cd ColorPipe-tools/lubLab
ln -s ../utils utils
@niieani
niieani / CONVERTING.md
Last active April 26, 2017 21:14
Nikon TassinFlat LUT files for Adobe Premiere / Adobe Speedgrade / Adobe After Effects

Installing and using lut_to_lut from ColorPipe-tools under Mac OS X

# install dependencies:
brew install homebrew/python/numpy homebrew/python/scipy
brew install opencolorio --with-python
git clone https://github.com/mikrosimage/ColorPipe-tools
cd ColorPipe-tools/lubLab
ln -s ../utils utils
@niieani
niieani / index.html
Last active June 26, 2016 13:34
Benchmark Descriptor Getting/Setting
<html>
<head>
<script src="https://wzrd.in/bundle/lodash@4.11"></script>
<script src="https://wzrd.in/bundle/platform@1.3"></script>
<script src="https://wzrd.in/bundle/benchmark@2.1"></script>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
@niieani
niieani / index.html
Created June 25, 2016 23:44
Benchmark
<html>
<head>
<script src="https://wzrd.in/bundle/lodash@4.11"></script>
<script src="https://wzrd.in/bundle/platform@1.3"></script>
<script src="https://wzrd.in/bundle/benchmark@2.1"></script>
</head>
<body>
<script>
var Benchmark = require('benchmark');
var suite = new Benchmark.Suite;
@niieani
niieani / app.html
Last active January 4, 2018 02:38
Aurelia Observer Test + AST hooks
<template>
<require from="./example"></require>
<binding-intercept-example if.bind="show"></binding-intercept-example>
</template>