Skip to content

Instantly share code, notes, and snippets.

View devkral's full-sized avatar

Alexander devkral

  • 23:33 (UTC +02:00)
View GitHub Profile
@devkral
devkral / default.nix
Created February 2, 2017 22:29
stackenblocken
{ lib, fetchFromGitHub, writeScriptBin
, haskellPackages, mpg321 }:
let
repo = fetchFromGitHub {
owner = "openlab-aux";
repo = "stackenblocken";
rev = "labpingbot";
sha256 = "1x319sbkk8hl3lad2zapkdv6ihqqsl8f5l0a2n9fvppcm5c7pz0d";
};
@devkral
devkral / PKGBUILD
Created May 3, 2015 20:08
libressl PKGBUILD fixes
# Contributor: Reventlov <contact@volcanis.me>
# fixes: alex
pkgname=libressl
pkgver=2.1.6
pkgrel=1
pkgdesc="FREE version of the SSL/TLS protocol forked from OpenSSL"
url="http://www.libressl.org/"
arch=('i686' 'x86_64')
license=('custom:Openssl')
@devkral
devkral / vcardsplit_by_name.py
Created March 29, 2015 02:32
python script for splitting combined VCARD in single, named VCARDs
#! /usr/bin/env python3
# license: WTFPL
import sys
import os
if len(sys.argv)<3:
print("usage: inputfile outputdir")
sys.exit(0)
@devkral
devkral / etc conf.d cpupower (config)
Created January 8, 2012 18:21
cpupower init enhanced version
# The CPU specific power-management-driver (e.g. powernow-k8) is necessary for cpupower to work. Don't forget to load it!
# valid governors:
# ondemand, performance, powersave,
# conservative, userspace
#governor="ondemand"
# limit frequency range (optional)
# valid suffixes: Hz, kHz (default), MHz, GHz, THz
@devkral
devkral / etc rc.d cpupower
Created January 7, 2012 19:18
splitted init file
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
case "$1" in
start|restart)
stat_busy "Setting cpupower rules"
if /usr/bin/cpupower_init.sh; then
@devkral
devkral / networkcheck.h
Created January 3, 2012 19:26
internet connection test
/** Checks internet connection by making a dns request.
* The returned result is the error number of
* the dns request attempt.
* zero = connection available
* Licence: do what you want with this code snippet
*/
#include <netdb.h>
int networkdnstest(char *testdnsname)
@devkral
devkral / PKGBUILD
Created December 24, 2011 23:52
virtualbricks-pkgbuild-patch
# Maintainer: max_meyer
pkgname=virtualbricks
pkgver=0.5
pkgminorver=346
pkgrel=1
pkgdesc="An all in one virtualization solution available for the linux desktop"
arch=(any)
url="http://virtualbricks.eu/"
license=('GPL')
depends=('gnome-python-extras' 'python2' 'libglade' 'python-pygraphviz' 'python-imaging')
@devkral
devkral / signal_destroy
Created September 24, 2011 18:47
Gtkmm signal handling
bool test2(GdkEventAny*)
{
cout << "test";
return true;
};
int main()
{
window.signal_delete_event().connect(sigc::ptr_fun(test2));