This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pi@raspberrypi:~/Desktop/severak/resoup $ php import.php | |
| ERROR | |
| Bad import parameters. | |
| Please specifiy: | |
| - RSS file | |
| - destination username | |
| pi@raspberrypi:~/Desktop/severak/resoup $ php import.php backup/soup_severak_2015-09-16.rss severak | |
| Blog not found, creating it... | |
| importing your feed... | |
| OK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C:\mv>git clone https://[email protected]/severak/resoup.git catstream | |
| Cloning into 'catstream'... | |
| remote: Counting objects: 392, done. | |
| remote: Compressing objects: 100% (364/364), done. | |
| remote: Total 392 (delta 110), reused 0 (delta 0) | |
| Receiving objects: 100% (392/392), 2.36 MiB | 1.26 MiB/s, done. | |
| Resolving deltas: 100% (110/110), done. | |
| Checking connectivity... done. | |
| Checking out files: 100% (221/221), done. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // mpdf sizes code | |
| // | |
| // extracted from mpdf itsel | |
| //Scale factor | |
| define('_MPDFK', (72 / 25.4)); | |
| class mpdf { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inkscape/gravit: | |
| 72 dpi | |
| 148mm = 419.527px | |
| 1mm = 2.83px | |
| --- | |
| mpdf: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // kostely Praha | |
| [out:json][timeout:25]; | |
| // gather results | |
| ( | |
| area[name="Praha"]->.prague; | |
| way(area.prague)["amenity"="place_of_worship"]; | |
| way(area.prague)["amenity"="place_of_worship"]; | |
| ); | |
| // print results | |
| out center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // u SVG aplikuje třídy definované v <style> do polygonů a cest | |
| function parseStyles(SimpleXMLElement $svg) | |
| { | |
| // var_dump($classByName); | |
| $classesRaw = array(); | |
| preg_match_all('/\.(.*?)\{(.*?)\}/', (string) $svg->defs->style, $classesRaw); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // backward compatible emulation of magic quotes | |
| if (!get_magic_quotes_gpc()) { | |
| // This replicates magic_quotes_gpc in PHP 5.4+ | |
| foreach($_POST as $_key => $_val){ | |
| if (is_string($_val)) { | |
| $_POST[$_key] = addslashes($_val); | |
| } elseif (is_array($_val)) { | |
| foreach ($_val as $_subkey=>$_subval) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // čtení z DB | |
| $rows->getOne($table, $where) | |
| $rows->count($table, $where) | |
| $rows->getMore($table, $where, $order) | |
| $rows->getPage($table, $where, $order, $pageNo, $perPage) | |
| $total = $rows->pageCount; // vyplněno po volání getPage, jinak obsahuje -1 | |
| // úpravy DB | |
| $rows->insert($table, $data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // spočítá, kolik Milošovi darovali jeho voliči a kolik trolové | |
| // na vstupu je uložené HTML transparentního účtu z | |
| // https://www.fio.cz/ib2/transparent?a=2501277007 | |
| $html = file_get_contents('milos69.html'); | |
| $doc = new DOMDocument(); | |
| $doc->loadHTML($html); | |
| $sxml = simplexml_import_dom($doc); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pi@raspberrypi:~ $ file | |
| Usage: file [-bcEhikLlNnprsvzZ0] [--apple] [--extension] [--mime-encoding] [--mime-type] | |
| [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ... | |
| file -C [-m magicfiles] | |
| file [--help] | |
| pi@raspberrypi:~ $ cd Downloads/ | |
| pi@raspberrypi:~/Downloads $ file _pol_118.zst | |
| _pol_118.zst: Zstandard compressed data (v0.8+), Dictionary ID: None | |
| pi@raspberrypi:~/Downloads $ apt-cache search zstd | |
| libzstd-dev - fast lossless compression algorithm -- development files |