Skip to content

Instantly share code, notes, and snippets.

Tibor Benke ihrwein

Block or report user

Report or block ihrwein

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
ihrwein / .envrc
Created Mar 15, 2019
Running vessel-itinerary-domain-service on local dev machine
View .envrc
export APP_JWT_VERIFY_TOKEN="false"
export APP_OUTPUT_CONFIG="true"
export APP_EXTERNAL_DATA_GATEWAY_ADDRESS="http://vessel-itinerary-domain-service-stubs:8001"
export APP_ELASTICSEARCH_HOST="localhost"
export APP_ELASTICSEARCH_MAPPING_CONFIG="./infrastructure/data/mapping.json"
View .vimrc
syntax on
set hlsearch
set expandtab
set tabstop=4
ihrwein /
Last active Jul 4, 2019
Building minimal Rust containers with Docker multi stage builds

The built image for a hello world project is less than 8 MB.

Builder image (it'd be best to upload this image to Docker Hub. This is 100% percent reusable).

FROM ubuntu:latest

ENV TARGET=x86_64-unknown-linux-musl
ENV BUILD_DIR=/src/target/x86_64-unknown-linux-musl/release/
extern crate alloc;
extern crate libc;
use std::mem;
use std::ptr;
pub struct Trie {
data: alloc::raw_vec::RawVec<u8>,
ihrwein /
Created Feb 1, 2016
Rust Higher-rank lifetime example
// D is some data shared among event handlers
pub trait EventHandler<D> {
fn handle_event(&mut self, &mut D);
pub struct EH;
impl<'a> EventHandler<Data<'a>> for EH {
fn handle_event(&mut self, data: &mut Data<'a>) {
println!("{}", data._d1);
ihrwein /
Last active Jan 5, 2016
getch() in Rust
1. copy getch() into getch.c from here:
2. compile getch.c with: gcc -o -shared -fPIC getch.c
3. create with the below content
4. compile rustc -L.
5. run it: LD_LIBRARY_PATH=. ./getch
You can extract these steps into a build script (or someone can make a platform independent getch based on this)
View draft spec
A feladat celja egy korokre osztott halozati torpedo jatek keszitese szoveges
felhasznalo interfesszel. A torpedo jatekot ket fel jatssza egymas ellen. A
szerver egyszerre tobb parhuzamos jatekot is tamogat, melynek maximalis szamat
forditas idoben lehet megadni.
A jatekok futasahoz eloszor a szervert kell elinditani, mely egy adott TCP
porton varja a kliensek csatlakozasat. Miutan ket jatekra varo kliens is
ihrwein /
Created Sep 18, 2015
Rust bindgen run on syslog-ng
/* automatically generated by rust-bindgen */
pub type ptrdiff_t = ::libc::c_long;
pub type size_t = ::libc::c_ulong;
pub type wchar_t = ::libc::c_int;
pub type gint8 = ::libc::c_char;
pub type guint8 = ::libc::c_uchar;
pub type gint16 = ::libc::c_short;
pub type guint16 = ::libc::c_ushort;
pub type gint32 = ::libc::c_int;
ihrwein / syslog-ng OSE 3.7 debian repo
Created Sep 2, 2015
syslog-ng OSE 3.7 debian repo
View syslog-ng OSE 3.7 debian repo
wget -qO - | apt-key add -
echo 'deb ./' >> /etc/apt/sources.list.d/syslog-ng-obs.list
ihrwein / Output
Last active Aug 29, 2015
Syslog-ng with Python tf functions
View Output
I'm the function: host=localhost 1st arg=first_arg 2nd arg=second_arg
You can’t perform that action at this time.