Skip to content

Instantly share code, notes, and snippets.

View niieani's full-sized avatar

Bazyli Brzóska niieani

View GitHub Profile
@kogir
kogir / aero-restore-state.sh
Last active December 16, 2015 09:59
Simple sync scripts for symlinks in AeroFS. Create and run them from the root of your AeroFS folder.
#!/bin/bash
tar -xzf .aero-meta/symlinks.tgz
rm .aero-meta/symlinks.tgz
cat .aero-meta/exec.list | xargs -0 chmod +x
rm .aero-meta/exec.list
rm -rf .aero-meta

main.js:

export function configure(aurelia) {
  aurelia.use
    .standardConfiguration()
    .developmentLogging();

  // Assuming a file named "knockout-custom-attribute.js", containing the
  // custom attribute class defined above, exists in the root of the project:
 aurelia.use.globalResources('./knockout-custom-attribute');
@Igorbek
Igorbek / _typescript_proposal_member_level_type_constraints.md
Last active July 14, 2016 00:08
TypeScript Proposal: generic type constraint on member level
@niieani
niieani / server-renderer.js
Last active January 11, 2017 00:55
Server Rendering Aurelia
import * as path from 'path';
import 'aurelia-polyfills';
import {Options, NodeJsLoader} from 'aurelia-loader-nodejs';
import {PLATFORM, DOM} from 'aurelia-pal';
import {globalize} from 'aurelia-pal-nodejs';
import {Aurelia} from 'aurelia-framework';
// ignore importing '.css' files, useful only for Webpack codebases that do stuff like require('./file.css'):
require.extensions['.css'] = function (m, filename) {
return;
apt-get install debootstrap
fdisk /dev/sdb
o
n
<return>
<return>
<return>
w
@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
@SMotaal
SMotaal / README.md
Created October 20, 2017 12:21
M?JS Pattern

This gist shows a living realworld example of how a complex NodeJS single-file module can be written in both JS and MJS with the bulk of the files being identical and imports and exports hoisted together. This is done to promote consistency by reducing the task of code updates to a simple copy/paste between the files if transpilaing is not possible.

@jdanyow
jdanyow / app.html
Last active November 29, 2017 01:39
Google reCAPTCHA with Aurelia
<template>
<require from="./recaptcha"></require>
<form action="?" method="POST">
<recaptcha theme="light" verified.call="onVerified($event)"></recaptcha>
<recaptcha theme="dark" verified.call="onVerified($event)"></recaptcha>
<br>
<input type="submit" value="Submit">
@YBogomolov
YBogomolov / fix.js
Last active January 23, 2018 21:46
Y-combinator in JavaScript (ES6) with memoization
// `fix` is an Y-combinator implementation (recursive calls in lambda calculus):
// Y = \f -> (\x -> f (x x))(\x -> f (x x))
// fix :: (a -> a) -> a
const fix = f => (x => f(y => (x(x))(y)))(x => f(y => (x(x))(y)));
// Generator function. Inner signature should correspond to actual function interface.
// mapgen :: ((a -> b) -> [a] -> [b]) -> (a -> b) -> [a] -> [b]
const mapgen = map => f => list => list.length === 0 ? [] : [f(list[0]), ...map(f)(list.slice(1))];
<template>
<require from="./dynamic-expression-binding-behavior"></require>
<require from="./debug"></require>
<label repeat.for="property of properties">
${property.label}
<input value.bind="model & dynamicExpression:property.expression">
</label>
<debug></debug>