Skip to content

Instantly share code, notes, and snippets.


Andras Kovi andrask

  • Budapest, Hungary
View GitHub Profile
andrask / eventpump.go
Last active Jan 9, 2021
Eventpump with channels
View eventpump.go
type Event interface{}
type EventChannel chan Event
type EventPump struct {
Input EventChannel
Outputs []EventChannel
const BufferSize = 20
andrask /
Last active May 31, 2020
hp3050a related tricks

How to hard reset the printer?

From Home screen press Back/Cancel/Back/Back Buttons, in sequence.

  1. Pess OK to enter Support Menu (Selection Button 2).
  2. Press Selection Button 3 for Reset Menu and press OK (Selection Button 2).
  3. Press Selection Button 3 for Semi-Full Reset and press OK (Selection Button 2).
  4. Wait for unit to Power Down/Turn Off.
  5. Press Power button to turn the Printer On. >
andrask /
Created Dec 24, 2018
How to reset a lost password on LUKS-encrypted Linux Mint Ubuntu
andrask / fb_find_trolls.js
Last active Apr 9, 2018
Are you fed up with trolls on FB? This script adds a "Find trolls" button right next to the "Home" link in the blue bar. Update the trolls list to include all trolls you know. Push the "Find trolls" to mark the comments from these users with a troll face.
View fb_find_trolls.js
// ==UserScript==
// @name Facebook troll finder
// @namespace,2018:andrask
// @description Find trolls in FB comment authors
// @include*
// @include*
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==
#! /usr/bin/env python
This is a test script for
import socket
port = 12000
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
serversocket.bind(('localhost', port))
package rx.behaviorsubject;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.junit.Test;
View mirror-p2-repos.pom.xml
<project xmlns="" xmlns:xsi=""
View OpenAndReadZipFile
import java.util.Enumeration;
public class Something {
View WirelessBandManager.m
// WirelessBandManager.m
// CmdScanner
// Created by Andras Kovi on 2013.04.05..
#import <Foundation/Foundation.h>
#import <IOBluetooth/IOBluetooth.h>
andrask / gist:4608603
Created Jan 23, 2013
Example for ExecutorService in Java
View gist:4608603
package aa;
import java.text.MessageFormat;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;
public class Pooling {
private static final int NUMBER_OF_THREADS = 3;