Skip to content

Instantly share code, notes, and snippets.

View bvarga's full-sized avatar

Balázs Varga bvarga

  • Scarab Research
  • Budapest
View GitHub Profile

Keybase proof

I hereby claim:

  • I am bvarga on github.
  • I am balazs (https://keybase.io/balazs) on keybase.
  • I have a public key whose fingerprint is EF87 7A3C EFFB 6D4F B19F F3A9 5848 7BD8 49DC BD46

To claim this, I am signing this object:

max number of words: 3
max length of words: 6
email:
ÀÁÂÃÄÅ ÆÇÈÉÊË ÌÍÎÏÐÑ
mapping:
À (À) -> “H”
@bvarga
bvarga / gist:f877eef702130e731acdef720b6cb9ad
Created August 4, 2017 09:27
webfontrecos: character mapping example
À (À) -> “H”
Á (Á) -> “e”
 (Â) -> “l”
à (Ã) -> “l”
Ä (Ä) -> “o”
Å (Å) -> “” (space)
Æ (Æ) -> “W”
Ç (Ç) -> “o”
È (È) -> “r”
É (É) -> “l”
<style>
@font-face {
font-family: 'DynamicFont';
src: url('https://us-central1-webfontrecos.cloudfunctions.net/font') format('opentype');
}
#content {
font-family: 'DynamicFont';
}
</style>
@bvarga
bvarga / gist:2f7e7780807828c7726fef331e36282f
Created August 3, 2017 14:46
Unique sequences of characters
<span id="content">
&#xc0;&#xc1;&#xc2;&#xc3;&#xc4;&#xc5;&#xc6;&#xc7;&#xc8;&#xc9;&#xca;&#xcb;&#xcc;&#xcd;&#xce;&#xcf;&#xd0;&#xd1;&#xd2;&#xd3;&#xd4;&#xd5;&#xd6;&#xd7;&#xd8;&#xd9;&#xda;&#xdb;&#xdc;&#xdd;&#xde;&#xdf;&#xe0;&#xe1;&#xe2;&#xe3;&#xe4;&#xe5;&#xe6;&#xe7;&#xe8;&#xe9;&#xea;&#xeb;&#xec;&#xed;&#xee;&#xef;&#xf0;&#xf1;&#xf2;&#xf3;&#xf4;&#xf5;&#xf6;&#xf7;&#xf8;&#xf9;&#xfa;&#xfb;&#xfc;&#xfd;&#xfe;&#xff;&#x100;&#x101;&#x102;&#x103;&#x104;&#x105;&#x106;&#x107;&#x108;&#x109;&#x10a;&#x10b;&#x10c;&#x10d;&#x10e;&#x10f;&#x110;&#x111;&#x112;&#x113;&#x114;&#x115;&#x116;&#x117;&#x118;&#x119;&#x11a;&#x11b;&#x11c;&#x11d;&#x11e;&#x11f;&#x120;&#x121;&#x122;&#x123;&#x124;&#x125;&#x126;&#x127;&#x128;&#x129;&#x12a;&#x12b;&#x12c;&#x12d;&#x12e;&#x12f;&#x130;&#x131;&#x132;&#x133;&#x134;&#x135;&#x136;&#x137;&#x138;&#x139;&#x13a;&#x13b;&#x13c;&#x13d;&#x13e;&#x13f;&#x140;&#x141;&#x142;&#x143;&#x144;&#x145;&#x146;&#x147;&#x148;&#x149;&#x14a;&#x14b;&#x14c;&#x14d;&#x14e;&#x14f;&#x150;&#x151;&#x152;&#x153;&#x154;&#x155;&#x156;&#x157;&#
@bvarga
bvarga / index.html
Last active August 29, 2015 14:20 — forked from andrascsibi/index.html
<script type="text/javascript">
var ScarabQueue = ScarabQueue || [];
(function(subdomain, id) {
if (document.getElementById(id)) return;
var js = document.createElement('script'); js.id = id;
js.src = subdomain + '.predict.emarsys.cn/js/1A8AD954AF4442AE/scarab-v2.js';
var fs = document.getElementsByTagName('script')[0];
fs.parentNode.insertBefore(js, fs);
})('https:' == document.location.protocol ? 'https://recommender' : 'http://cdn', 'scarab-js-api');
</script>

Keybase proof

I hereby claim:

  • I am bvarga on github.
  • I am balazs (https://keybase.io/balazs) on keybase.
  • I have a public key whose fingerprint is B1C4 500B A612 0914 6DA1 654B E53D 73DA B06B 8D45

To claim this, I am signing this object:

@bvarga
bvarga / gist:6155414
Created August 5, 2013 12:00
insert text at a given position
insertAtCursor: function(myField, myValue) {
//IE support
if (document.selection) {
myField.focus();
sel = document.selection.createRange();
sel.text = myValue;
}
//MOZILLA/NETSCAPE support
else if (myField.selectionStart || myField.selectionStart == '0') {
var startPos = myField.selectionStart;
@bvarga
bvarga / client log
Created March 27, 2013 20:15
client log
2013-03-27 20:34:09 [INFO] [Faye.Client] Initiating handshake with "/faye" client.js:1
2013-03-27 20:34:09 [DEBUG] [Faye.Client] Passing through "outgoing" extensions: {"channel":"/meta/handshake","version":"1.0","supportedConnectionTypes":["long-polling"],"id":"1"} client.js:1
2013-03-27 20:34:09 [DEBUG] [Faye.Transport] Client undefined sending message to "/faye": {"channel":"/meta/handshake","version":"1.0","supportedConnectionTypes":["long-polling"],"id":"1"} client.js:1
2013-03-27 20:34:10 [DEBUG] [Faye.Transport] Client undefined received from "/faye": [{"id":"1","channel":"/meta/handshake","successful":true,"version":"1.0","supportedConnectionTypes":["long-polling","cross-origin-long-polling","callback-polling","websocket","eventsource","in-process"],"clientId":"0ufzlrm1akobxp1swem3o1eak1d1","advice":{"reconnect":"retry","interval":0,"timeout":45000}}] client.js:1
2013-03-27 20:34:10 [DEBUG] [Faye.Client] Passing through "incoming" extensions: {"id":"1","channel":"/meta/handshake","successful":true,"ve
@bvarga
bvarga / gist:4068920
Created November 13, 2012 22:38
zmq monitor disconnect event bug.
#include "../include/zmq.h"
#include "../include/zmq_utils.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "../src/platform.hpp"