Skip to content

Instantly share code, notes, and snippets.

István Szmozsánszky flaki

Block or report user

Report or block flaki

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
@flaki
flaki / native-promise-deferred.js
Created Jun 7, 2014
Deferred objects tooling based on the native ES6 Promise implementation
View native-promise-deferred.js
/*
* 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;
View 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 / iojs_es6.md
Last active Aug 29, 2015
# io.js 1.0.0 (beta) is OUT — a beginners' guide to io.js and ES6
View iojs_es6.md

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 / hacks-rust-intro.md
Last active Aug 29, 2015
Rust 1.0.0 release introductory article for Hacks v5
View hacks-rust-intro.md

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 / init.coffee
Created Jul 18, 2015
Atom on Windows and Hungarian keyboard layout AltGr+<key> keybinding fix - add this to your init.coffee
View 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 / accel.js
Created Sep 8, 2015
T2 Rust Example
View accel.js
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 / nored.html
Created Sep 30, 2015
SVG Filter removing the red channel
View nored.html
body {
background:black;
}
p.target {
color: white;
margin: 0;
display: inline-block;
width: 16em;
}
p.target span {
@flaki
flaki / halloweend.ino
Created Nov 1, 2015
Spooky version of the Arduboy rund.ino game (https://github.com/flaki/arduino-rund-ino)
View halloweend.ino
#include <SPI.h>
#include "Arduboy.h"
#include <EEPROM.h>
#include <avr/pgmspace.h>
Arduboy arduboy;
// frame counter
unsigned int frame = 0;
@flaki
flaki / formerreps.js
Last active Jan 8, 2016
Check Rep status (active/former) in reps.mozilla.org dashboard
View formerreps.js
if (window.location.toString() === "https://reps.mozilla.org/dashboard/") {
[].forEach.call(
document.querySelectorAll('#dashboard-mentorship-block [href*="/u/"]'),
function(a) {
console.log("Checking "+a.href+" ... ");
var r = new XMLHttpRequest();
r.open("GET", a.href);
r.onreadystatechange = function () {
if (r.readyState != 4 || r.status != 200) return;
var former = r.responseText.match(/Former Rep/);
@flaki
flaki / FirefoxEmoji.md
Last active Jan 8, 2016
Enabling FirefoxEmoji emoticons and the Firefox OS Emoji keyboard
View FirefoxEmoji.md

Firefox OS Emoji 101

How to enable the built-in emoji keyboard?

  • Go to Settings ➡️ Keyboards ➡️ Select Keyboards:
  • Tick ✅ Emoji in the Built-in Keyboard group
  • Use the "change layout" button on the keyboard to switch between layouts, or
  • Long-press on the layout-change button and select "Emoji" to enable

If the option is not available, make sure you are on latest master, or if you are Foxfooding, set the nightly-latest update channel

You can’t perform that action at this time.