Skip to content

Instantly share code, notes, and snippets.

View niieani's full-sized avatar

Bazyli Brzóska niieani

View GitHub Profile
@JacobJohansen
JacobJohansen / AuthyToOtherAuthenticator.md
Created October 20, 2017 15:12 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

@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.

@mowings
mowings / README.md
Last active December 30, 2020 08:01
Set up xhyve with Ubuntu 16.04

Introduction

Setting up an OS to work with xhyve can be a bit tricky, but it's not impossible. These intructions should be generally applicable to most versions of Linux.

Create a disk image file

Xhyve will use a file as a logical disk. Be sure you have the filesize you need, because growing the file later is tricky to impossible (you could try to use qcow or similar to get around this, but qcow volumes can be tricky to mount).

dd if=/dev/zero of=hdd.img bs=1g count=32 # Create a 32 gig disk. Raise 'count' as desired
@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;
@nikgraf
nikgraf / reactive-2016.md
Last active August 5, 2021 15:31
Proposal for lightning talk at Reactive Conf 2016

Rich text editing with DraftJS Plugins

Earlier this year Facebook open sourced its React based rich text editing framework Draft.js. At Facebook it powers status updates, comments & notes. Others used it to build editors matching Medium’s experience.

Together with a whole team of open source contributors I built a plugin architecture on top of Draft.js. In this talk I walk you through the existing plugins and show how you can build your own feature-rich text editor for the web with only a handful lines of code. 🤓

Draft JS Plugins Logo

export {}
if (typeof Array.prototype.flatMap !== 'function') {
// eslint-disable-next-line no-extend-native
Object.defineProperty(Array.prototype, 'flatMap', {
enumerable: false,
// https://bterlson.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
value: function flatMap (callback, thisArg = undefined) {
const O = toObject(this)
const A = arraySpeciesCreate(O, 0)
@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
@Igorbek
Igorbek / _typescript_proposal_member_level_type_constraints.md
Last active July 14, 2016 00:08
TypeScript Proposal: generic type constraint on member level
<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>