Skip to content

Instantly share code, notes, and snippets.

@ovk
ovk / main.java
Created May 27, 2021 17:44
Producer-Consumer Java
/*
There are multiple threads producing a text messages (Producers)
and multiple threads consuming these messages (Consumers).
Please define the required data structure and implement methods 'put' and 'get'.
You can change definition of methods if needed.
Please do not use BlockingQueue or any classes implementing it.
See usage example below.
*/
@ovk
ovk / rle.java
Created May 27, 2021 17:43
RLE Java
/*
Please implement string encode method as defined below:
The encode method should replace input string character's sequences with count and single value.
Examples:
hello -> 1h1e2l1o
wwwoooorrllddd -> 3w4o2r2l3d
mama -> 1m1a1m1a
To simplify solution let's assume that no input string contains more than nine consecutive characters,
so count is always single digit number.
*/
@ovk
ovk / ubuntu_theme.reg
Created June 21, 2020 20:22
Default Gnome Terminal color scheme from Ubuntu 18.04 for Putty
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]
"Colour0"="211,215,207"
"Colour1"="211,215,207"
"Colour2"="46,52,54"
"Colour3"="46,52,54"
"Colour4"="46,52,54"
"Colour5"="211,215,207"
"Colour6"="46,52,54"
@ovk
ovk / gw2talker.au3
Created July 5, 2015 22:56
Guild Wars 2 World Bosses notification script
#include <MsgBoxConstants.au3>
#include <Date.au3>
; -----------------------------------------------------------------------------
; C O N F I G B E G I N
; -----------------------------------------------------------------------------
; Use following symbols to define hot-keys:
; ^ - Ctrl
; ! - Alt
; + - Shift