Skip to content

Instantly share code, notes, and snippets.

@juriad
juriad / configure
Created September 24, 2012 13:21
lirc compilation
root@backend:~# ./configure.sh --with-kerneldir=/usr/src/linux-source-2.6.32
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
@juriad
juriad / page.html
Created October 8, 2012 20:57
benchmarkování rychlosti různých způsobů vložení tabulky do stránky včetně spuštění inline javascriptu
<html>
<script type="text/javascript" src="jquery-1.7.1.min.js" ></script>
<body>
<script>
function log(message) {
$('#log').append('<li>'+message+'</li>');
}
function genContent(row, col, js) {
return (js?'<script>$("#xxx");/*log("'+row+' x '+col+'");*/</'+'script>':'')+row+' x '+col;
@juriad
juriad / copy.pl
Created October 9, 2012 08:22
Hledám program pro Karel.Pospisil.8
use strict;
use warnings;
use feature qw(say switch);
use Data::Dumper;
my %errors = ( "format" => "Wrong format of line", "duplicate key" => "Duplicate key of line" );
if(scalar @ARGV != 4) {
say "script requires four arguments (two input files, two output files)";
say "copy.pl <main.txt> <old.txt> <new.txt> <error.txt>";
@juriad
juriad / verze.patch
Created October 29, 2012 17:52
verze v pluginu a patičce
diff --git a/ceinstall/build.sh b/ceinstall/build.sh
index 12fa816..24cded9 100755
--- a/ceinstall/build.sh
+++ b/ceinstall/build.sh
@@ -4,7 +4,7 @@ cd ../localization_sk/ && atlas-mvn clean package && cd ../ceinstall
atlas-mvn clean assembly:assembly
mkdir ceplugin
rm ceplugin/ce-* ceplugin/localization_cz-*.jar
-cp ../semanta/target/ce-2.1.6-SNAPSHOT.jar ceplugin/
+cp ../semanta/target/ce-2.1.6.jar ceplugin/
@juriad
juriad / output
Created April 23, 2013 09:23
php -dvld.active=1 phpinfo.php
php -dvld.active=1 phpinfo.php
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/json.so' - /usr/lib/php/modules/json.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/sqlite.so' - /usr/lib/php/modules/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/adam/vld-0.11.2/phpinfo.php on line 3
phpinfo()
PHP Version => 5.4.13
System => Linux judy 3.8.4-1-ARCH #1 SMP PREEMPT Wed Mar 20 22:10:25 CET 2013 x86_64
Build Date => Mar 2
@juriad
juriad / private-protected.php
Created May 30, 2013 07:54
Modifikátory přístupu v PHP
<?php
class Predek {
private $privatePromenna = 1;
protected $protectedPromenna = 2;
public $publicPromenna = 3;
private function privateGetPrivate() {
return $this->privatePromenna;
}
@juriad
juriad / dmesg
Created September 6, 2013 15:09
OOM killer
[33477.518738] vmplayer invoked oom-killer: gfp_mask=0x200da, order=0, oom_score_adj=0
[33477.518745] vmplayer cpuset=/ mems_allowed=0
[33477.518749] CPU: 1 PID: 21585 Comm: vmplayer Tainted: P O 3.11.0-1-ARCH #1
[33477.518750] Hardware name: Hewlett-Packard HP EliteBook 8440p/172B, BIOS 68CCU Ver. F.12 03/09/2011
[33477.518753] 0000000000000000 ffff88022f571960 ffffffff814d9e7d ffff88021634dcd0
[33477.518756] ffff88022f5719f0 ffffffff814d7e28 ffff88022f571980 ffffffff81061a46
[33477.518759] ffff88022f5719c8 ffffffff810f0594 0000000000000000 0000000000020f77
[33477.518762] Call Trace:
[33477.518772] [<ffffffff814d9e7d>] dump_stack+0x54/0x8d
[33477.518775] [<ffffffff814d7e28>] dump_header+0x7f/0x200
@juriad
juriad / chyby v propojení dokumentů na univerza
Last active December 28, 2015 00:59
Dotaz na počet použití objektu univerza z reportu.
select distinct
dp.DOCUMENT document,
dp.NAME provider,
dp.DATA_SOURCE source_name
from
BO_DATA_PROVIDER dp
left join BO_UNIVERSE u on (dp.DATA_SOURCE = u.NAME)
where
dp.ID not like '[_]%' and u.NAME is null
order by
@juriad
juriad / torus.cpp
Created October 17, 2014 09:21
Torus rendering
// Include standard headers
#include <stdio.h>
#include <stdlib.h>
// Include GLEW
#include <GL/glew.h>
// Include GLFW
#include <GLFW/glfw3.h>
GLFWwindow* window;
@juriad
juriad / torus.cpp
Created October 17, 2014 13:43
Torus rendering - transparency working
// Include standard headers
#include <stdio.h>
#include <stdlib.h>
// Include GLEW
#include <GL/glew.h>
// Include GLFW
#include <GLFW/glfw3.h>
GLFWwindow* window;