Skip to content

Instantly share code, notes, and snippets.


Vladimír Smitka lynt-smitka

View GitHub Profile
View CMSMS - .htaccess
# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
lynt-smitka / gordon
Last active Aug 29, 2015
Custom comments
View gordon
do functions.php
/* =================================================================== */
function gordon_comments( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
<div id="comment-<?php comment_ID(); ?>" class="comment-body">
<div class="comment-body-inner">
View gist:89f8cb53e477ec740b7b
//do functions.php
function sparkling_header_menu() {
'menu' => 'primary',
'theme_location' => 'primary',
'depth' => 3,
'container' => 'div',
'container_class' => 'collapse navbar-collapse navbar-ex1-collapse',
lynt-smitka / example
Last active Aug 29, 2015
Presměrování na přihlášení
View example
add_action('get_header', 'lynt_redirect_to_login');
function lynt_redirect_to_login(){
if ( is_page(123) ) {//nutno zadat spravne id stranky
if(!is_user_logged_in()) auth_redirect();
lynt-smitka / microcache-nginx-bypass
Last active Oct 8, 2015
Nástin možnosti řešení výjimek pro Nginx microcache
View microcache-nginx-bypass
set $no_cache "";
if ($request_method !~ ^(GET|HEAD)$) {
set $no_cache "1";
if ($http_cookie ~* "nocache") {
set $no_cache "1";
lynt-smitka / Excel Nibble swap
Created Oct 20, 2015
Překlad ID RFID karty ze čtečky v nibble módu pomocí Excelu
View Excel Nibble swap
lynt-smitka / ratings-correction.php
Last active Nov 3, 2015
WP mu-plugin replaces "Highest Score By Time Range" in WP-PostRatings for
View ratings-correction.php
Plugin Name: WP-Ratings Score correction for
Description: Displays the best posts in chosen timerange
Author: Vladimir Smitka
Version: 1.0
Author URI:
function get_highest_score_range($time = '1 day', $mode = '', $limit = 10, $chars = 0, $display = true) {
lynt-smitka / gist:5354534
Created Apr 10, 2013
Nette helper - přidá za jednoznaková slova nedělitelnou mezeru
View gist:5354534
$template->registerHelper('eol', function ($s) {
return preg_replace("/(?<=^\w) |(?<=\s\w) /","&nbsp;",$s);
View Cron ntp-sync
cd /etc/cron.hourly
touch ntpsync
chmod +x ntpsync
echo '#!/bin/bash' > ntpsync
echo 'ntpdate' >> ntpsync
echo 'hwclock --systohc' >> ntpsync

Keybase proof

I hereby claim:

  • I am lynt-smitka on github.
  • I am smitka ( on keybase.
  • I have a public key whose fingerprint is B793 750E 66F3 065B 8B84 2160 0C78 9771 CE93 44F3

To claim this, I am signing this object: