Skip to content

Instantly share code, notes, and snippets.

View kovacshuni's full-sized avatar

Hunor Kovács kovacshuni

View GitHub Profile
@kovacshuni
kovacshuni / Ady Endre - Misztérium.txt
Created January 28, 2016 11:48
Ady Endre - Misztérium
Csak az a mély és szent igazság,
Amit magába rejt a lélek,
Idétlen semmi, játszi hívság,
Amit leírok, elbeszélek.
Rendelteték, hogy néhány ember.
Tépődjék, sírjon mindhiába
S hogy meg ne értsék... Néhány ember
Ezernyi éve így csinálja...
Rendelteték, hogy dalba sírja
Néhány szegény bolond a lelkét
@kovacshuni
kovacshuni / eventlimiter.go
Created February 18, 2016 14:26
event-limiter
type EventLimiter struct {
ticker time.Ticker
trigger chan bool
timePassed chan bool
}
func NewLimiter() *EventLimiter {
ticker := time.NewTicker(60 * time.Second)
trigger := make(chan bool, 1)
timePassed := make(chan bool, 1)
@kovacshuni
kovacshuni / enriched-response.json
Last active August 9, 2016 11:12
videos-first-class
{
"id": "http://www.ft.com/thing/5123c256-760f-3f29-a9da-6a3437698f17",
"bodyXML": "<body>test helloo again and again and</body>",
"publishedDate": "2016-08-03T10:12:02.380Z",
"requestUrl": "http://xp-up-read.ft.com/enrichedcontent/5123c256-760f-3f29-a9da-6a3437698f17",
"brands": [
"http://api.ft.com/things/dbb0bdae-1f0c-11e4-b0cb-b2227cce2b54"
],
"apiUrl": "http://xp-up-read.ft.com/enrichedcontent/5123c256-760f-3f29-a9da-6a3437698f17",
"types": [
@kovacshuni
kovacshuni / article.json
Last active May 25, 2016 09:45
different-content-type-responses
{
"id": "http://www.ft.com/thing/0f432c22-2223-11e6-9d4d-c11776a5124d",
"type": "http://www.ft.com/ontology/content/Article",
"bodyXML": "<body><p>Greece’s international creditors have bought time to secure the country’s financial future after agreeing broad but inexact principles to ease its debt mountain and break an impasse between Germany and the <ft-content title=\"IMF urges eurozone to ease Greece’s debt pile with interest cap - FT.com\" type=\"http://www.ft.com/ontology/content/Article\" url=\"http://api.ft.com/content/2bf58684-2102-11e6-9d4d-c11776a5124d\">International Monetary Fund</ft-content>.</p>\n<p>After almost 11 hours of talks in Brussels, eurozone finance ministers and the IMF agreed to a range of measures to restructure <a href=\"http://www.ft.com/indepth/greece-debt-crisis\" title=\"Greece debt crisis in depth - FT.com\">Greece’s debts</a> when its €86bn bailout ends in 2018 — but put no figures on the concessions and left them subject to political decisions by eurozone countries. Mo
@kovacshuni
kovacshuni / response.txt
Created May 25, 2016 14:47
notifications-push-documentation
data: []
data: []
data: []
data: [{"apiUrl":"http://api.ft.com/content/7998974a-1e97-11e6-b286-cddde55ca122","id":"http://www.ft.com/thing/7998974a-1e97-11e6-b286-cddde55ca122","type":"http://www.ft.com/thing/ThingChangeType/UPDATE"}]
data: []
@kovacshuni
kovacshuni / fleetctl-shortcuts
Created August 3, 2016 11:33 — forked from tamas-molnar/fleetctl-shortcuts
aliases and shortcuts
alias fc='fleetctl'
alias fclm='fleetctl list-machines'
alias fclu='fleetctl list-units'
alias fcjf='fleetctl journal -f '
alias fcbad='fleetctl list-units | grep -v "exited\|running\|backup\|upgrade"'
function fclmg() { fleetctl list-machines | grep $@ ;}
function fclug() { fleetctl list-units | grep $@ ;}
function fcssh() { fleetctl ssh $@ ;}
function fcjfl() { fleetctl journal -f --lines=$@ ; }
@kovacshuni
kovacshuni / keybase.md
Created January 11, 2017 14:37
keybase.md

Keybase proof

I hereby claim:

  • I am kovacshuni on github.
  • I am kovacshuni (https://keybase.io/kovacshuni) on keybase.
  • I have a public key whose fingerprint is CD73 1BC4 48A4 3C60 32DB 2194 7266 0A64 2CD1 D6FA

To claim this, I am signing this object:

@kovacshuni
kovacshuni / Future-vs-CompletionStage.md
Created February 13, 2017 18:02
Future-vs-CompletionStage

Future -> CompletionStage

  1. map -> thenApply
  2. flatMap -> thenCompose
  3. forEach -> thenAccept
@kovacshuni
kovacshuni / simple.c
Created March 1, 2017 14:23
kill-daemon-process-test
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv) {
printf("Hello from the parent process!\n");
pid_t pid = fork();
if (pid == -1) {
perror("fork failed");
exit(-1);
@kovacshuni
kovacshuni / hightlighting-tid
Created March 15, 2017 16:54
hightlighting-tid
'notifications-monitor':
'patterns': [
{
'match': '^(tid_.*) ()'
'name': 'keyword.tid'
}
]