Skip to content

Instantly share code, notes, and snippets.

View dklesev's full-sized avatar
💭
I may be slow to respond.

Dimitrij Klesev dklesev

💭
I may be slow to respond.
View GitHub Profile
#!/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
# 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
#!/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 ! \
@dklesev
dklesev / big_red_button.c
Created October 7, 2015 10:56 — forked from arr2036/big_red_button.c
Simple program for interfacing with the Dream Cheeky Big Red Button, on any Linux/BSD type OS
/* (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:
@dklesev
dklesev / 0_reuse_code.js
Created January 1, 2014 18:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dklesev
dklesev / get_ppid_and_name.c
Created May 29, 2016 18:34 — forked from fclairamb/get_ppid_and_name.c
posix: Get parent process id and name
#ifdef SHELL
gcc -Wall -Werror $0 && ./a.out
exit $?
#endif
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
@dklesev
dklesev / signal.c
Created June 4, 2016 00:11 — forked from aspyct/signal.c
Unix signal handling example in C, SIGINT, SIGALRM, SIGHUP...
/**
* More info?
* a.dotreppe@aspyct.org
* http://aspyct.org
* @aspyct (twitter)
*
* Hope it helps :)
*/
#include <stdio.h>

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 / absender.lco
Created August 23, 2017 18:58 — forked from puppe/absender.lco
Deutsche Briefvorlage für LaTeX (scrlttr2)
\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)
@dklesev
dklesev / docker-cleanup-resources.md
Created August 24, 2017 03:32 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

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