Skip to content

Instantly share code, notes, and snippets.

@flaki
flaki / nored.html
Created September 30, 2015 10:06
SVG Filter removing the red channel
body {
background:black;
}
p.target {
color: white;
margin: 0;
display: inline-block;
width: 16em;
}
p.target span {
@flaki
flaki / accel.js
Created September 8, 2015 05:52
T2 Rust Example
var spawn = require('child_process').spawn;
var child = spawn('accel_rs', [], {});
// Use standard out...
child.stdout.on('data', function(data) {
console.log(data.toString());
});
// ... OR use a domain socket
var net = require('net');
@flaki
flaki / init.coffee
Created July 18, 2015 14:36
Atom on Windows and Hungarian keyboard layout AltGr+<key> keybinding fix - add this to your init.coffee
# Your init script
# Fixes AltGr problems on Hungarian keyboard layouts in Windows
# for characters [ (AltGr+F), < (AltGr+M), \ (AltGr+Q) and { (AltGr+B)
atom.keymaps.keyBindings = atom.keymaps.keyBindings.filter((binding, i) ->
['ctrl-alt-f','ctrl-alt-q','ctrl-alt-b','ctrl-alt-m'].indexOf(binding.keystrokes) == - 1
)
@flaki
flaki / hacks-rust-intro.md
Last active August 29, 2015 14:20
Rust 1.0.0 release introductory article for Hacks v5

Diving into Rust for the first time

A computer program may crash or hang due to a wide variety of reasons. Memory access violations/segmentation faults are most of the time rooted in unsafe memory handling, while hangs and unpredictable behavior could sometimes be attributed to concurrent, unsynced or out-of-sync access to memory.

Rust is a new programming language,

@flaki
flaki / iojs_es6.md
Last active August 29, 2015 14:13
# io.js 1.0.0 (beta) is OUT — a beginners' guide to io.js and ES6

io.js 1.0.0 (beta) is OUT — a beginners' guide to io.js and ES6

actually, it is more like 1.0.1, but heck! :)

So what is this “io.js” ?

TL;DR: io.js is a [fork] of [node.js].

A bit more in-depth, please?

A few core maintainers of node.js got fed up with the slow updates of node.js, the infinite beta state of 0.11 and that 0.12 was basically coming for two years now, and decided to create their own fork of the server-side JavaScript runtime, called it io.js and released it today.
Read the Q&A for more background!

@flaki
flaki / keybase.md
Created October 6, 2014 14:08
keybase.md

Keybase proof

I hereby claim:

  • I am flaki on github.
  • I am flaki (https://keybase.io/flaki) on keybase.
  • I have a public key whose fingerprint is 456C 501F 75FD 8D54 8C3A 12CD 6303 E8B6 1C62 C3CE

To claim this, I am signing this object:

@flaki
flaki / native-promise-deferred.js
Created June 7, 2014 15:18
Deferred objects tooling based on the native ES6 Promise implementation
/*
* Extends native promises with deferred objects.
* Deferreds return an object that has a <promise>, which could be resolved via
* the included <resolve> and <reject> calls.
*/
if (Promise && !("deferred" in Promise)) Promise.deferred = function() {
var fResolve,
fReject,
P = new Promise(function(resolve, reject) {
fResolve = resolve;