Skip to content

Instantly share code, notes, and snippets.

@janpecha
janpecha / changes.txt
Created September 6, 2012 22:36
Hezčí vyhledávací pole na CSFD.cz
* 2012-09-09
- políčko nepřekrývá "uživatelskou zónu", když je uživatel přihlášen, ale zmenší svoji šířku.
@janpecha
janpecha / Nette Action Method
Created September 5, 2012 16:14
Gedit3 Snippets for Nette Framework
public function action${1:Default}()
{
$0
}
@janpecha
janpecha / convert2mp3
Created September 2, 2012 17:23
Converting media files to MP3. Vyžaduje `ffmpeg`.
#!/bin/bash
# saves the path to this script's directory
dir=` dirname $0 `
# absolutizes the path if necessary
if echo $dir | grep -v ^/ > /dev/null; then
dir=` pwd `/$dir
fi
@janpecha
janpecha / nakn.js
Last active October 9, 2015 23:37
Vylepšení formuláře pro zadání čísla parcely na nahlizenidokn.cuzk.cz - automaticky přejde na další políčko při stisknutí lomítka. ZATÍM JEN PRO OPERU.
/** Vylepseni formulare na Nahlizeni do katastru nemovistosti
*
* @author Jan Pecha, <janpecha@email.cz>
* @version 2013-08-12-2
* @license New BSD License
*/
function nah_SelectAreaFormHelper()
{
var el = document.getElementById('ctl00_bodyPlaceHolder_txtParcis');
@janpecha
janpecha / .htaccess
Last active October 9, 2015 14:37
Dynamické subdomény pomocí .htaccess
### Source code moved to https://github.com/janpecha/htaccess-subdomains/ ###
## Custom Error Pages
#ErrorDocument 404 /errors/e404.html
<IfModule mod_dir.c>
DirectorySlash Off
</IfModule>
Options -Indexes
@janpecha
janpecha / ytdl
Created August 23, 2012 17:17
Shortcut for youtube-dl
#!/bin/bash
# saves the path to this script's directory
dir=` dirname $0 `
# absolutizes the path if necessary
if echo $dir | grep -v ^/ > /dev/null; then
dir=` pwd `/$dir
fi
@janpecha
janpecha / style.css
Created July 23, 2012 22:15
Piratskenoviny.cz Better Style
@import url('typro.css');
body {
border-top: 6px solid #222;
padding-bottom: 3em;
}
body * {
font-family: inherit !important;
font-size: inherit !important;
@janpecha
janpecha / adminer.css
Created July 2, 2012 11:00
Adminer Skin (based on default Nette Adminer skin)
/* CSS by Brade - www.bradezone.com */
/* Icons by Hever [hev.cz] - June 2009, ver 0.1.3 */
/* Used icons: Silk icon set 1.3 by Mark James --- http://www.famfamfam.com/lab/icons/silk/ */
/* modified by davidgrudl */
/* modified by Jan Pecha, <janpecha@email.cz>, 2012-09-16 */
body {
background: #FFF;
color: #333;