Skip to content

Instantly share code, notes, and snippets.

View tomaskavalek's full-sized avatar
:octocat:
Hardworking anytime 👍

Tomáš Kavalek tomaskavalek

:octocat:
Hardworking anytime 👍
View GitHub Profile
@tomaskavalek
tomaskavalek / infinity_port_read
Created January 28, 2011 10:25
Reading port in embed PC with worse Linux.
#!/bin/bash
# Nastaveni prenosu dat
stty -F /dev/ttyS1 raw speed 9600
# Smycka
while [ 1 ]; do
READ=`dd if=/dev/ttyS1 count=1`
echo $READ
done
@tomaskavalek
tomaskavalek / NShrink.NFinder.php
Created January 27, 2011 10:54
NShrink and NFinder in action - "draft"
<!DOCTYPE html><link rel="stylesheet" href="files/style.css">
<h1>NShrink and NFinder in action</h1>
<pre>
<?php
// Temporarily solution
require dirname(__FILE__) . '/Finder.php52.php';
@tomaskavalek
tomaskavalek / jQuery_create_elements.html
Created January 24, 2011 18:06
jQuery create element demo.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="copyright" content="" />
<meta name="author" content="" />
<meta name="robots" content="all, follow" />
<meta name="googlebot" content="index, follow, snippet, archive" />
@tomaskavalek
tomaskavalek / uv.tex
Created January 7, 2011 11:53
Uvozovky CZE
\def\clqq{\vbox to0pt{\vss\hbox{\char34}\kern-1.4ex}}
\chardef\crqq=92
\def\uv #1{\leavevmode\clqq #1\crqq}
<?php
public static function init($options = NULL) {
if(is_null($options) || !is_array($options)) return FALSE;
if(is_array(current($options))) {
foreach($options as $option) {
dibi::connect($option, self::CONNECTION . self::$connection++);
}
} else {
dibi::connect($options, self::CONNECTION . self::$connection++);