Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Dimitrij Klesev dklesev

💭
I may be slow to respond.
Block or report user

Report or block dklesev

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
View Useful JMX metric to monitor Java GC
Recently, I use JMXterm to collect info about Java JVM via JMX and MBeans. Here is a short note.
- Download JMXterm
https://sourceforge.net/projects/cyclops-group/files/jmxterm/1.0.0/jmxterm-1.0.0-uber.jar/download
- Run JMXterm
java -jar jmxterm-1.0.0-uber.jar --url localhost:<jmx listen port>
- All MBeans from java.lang
$>domain java.lang
@dklesev
dklesev / docker-cleanup-resources.md
Created Aug 24, 2017 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
@dklesev
dklesev / absender.lco
Created Aug 23, 2017 — forked from puppe/absender.lco
Deutsche Briefvorlage für LaTeX (scrlttr2)
View absender.lco
\ProvidesFile{absender.lco}
\KOMAoptions{%
% fromemail=true, % Email wird im Briefkopf angezeigt
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt
% fromfax=true, % Faxnummer wird im Briefkopf angezeit
% fromurl=true, % URL wird im Briefkopf angezeigt
% fromlogo=true, % Logo wird im Briefkopf angezeigt
% subject=titled, % Druckt "Betrifft: " vor dem Betreff
locfield=wide, % Breite Absenderergänzung (location)
View keybase.md

Keybase proof

I hereby claim:

  • I am dklesev on github.
  • I am dklesev (https://keybase.io/dklesev) on keybase.
  • I have a public key ASAuRiqxH87qpr4iN1pfiStcx6dymxAYH59MrG8K4q0WZQo

To claim this, I am signing this object:

@dklesev
dklesev / signal.c
Created Jun 4, 2016 — forked from aspyct/signal.c
Unix signal handling example in C, SIGINT, SIGALRM, SIGHUP...
View signal.c
/**
* More info?
* a.dotreppe@aspyct.org
* http://aspyct.org
* @aspyct (twitter)
*
* Hope it helps :)
*/
#include <stdio.h>
@dklesev
dklesev / get_ppid_and_name.c
Created May 29, 2016 — forked from fclairamb/get_ppid_and_name.c
posix: Get parent process id and name
View get_ppid_and_name.c
#ifdef SHELL
gcc -Wall -Werror $0 && ./a.out
exit $?
#endif
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
@dklesev
dklesev / big_red_button.c
Created Oct 7, 2015 — forked from arr2036/big_red_button.c
Simple program for interfacing with the Dream Cheeky Big Red Button, on any Linux/BSD type OS
View big_red_button.c
/* (The MIT License)
*
* Copyright (c) 2014 Arran Cudbard-Bell <a.cudbardb@freeradius.org>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the 'Software'), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
View GStreamer-1.0 some strings.sh
#!/bin/bash
# play YUV444 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \
videoconvert ! \
autovideosink
# play YUV422 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
View list_largest_dirs.sh
# List largest folders in a directory recursively
for i in G M K; do sudo du / -ah --exclude=/proc* | grep [0-9]$i | sort -nr -k 1; done | head -n 20
View upgrade-lxc.sh
#!/bin/bash
# Remove current lxc version which is lxc/1.0.0~alpha1-0ubuntu11
sudo apt-get remove lxc
# Download the new pakcages with the updated
wget https://launchpad.net/ubuntu/+source/lxc/1.0.0~alpha1-0ubuntu12/+build/5171688/+files/lxc_1.0.0~alpha1-0ubuntu12_amd64.deb
wget https://launchpad.net/ubuntu/+source/lxc/1.0.0~alpha1-0ubuntu12/+build/5171688/+files/liblxc0_1.0.0~alpha1-0ubuntu12_amd64.deb
# Install the updated packages
You can’t perform that action at this time.