Skip to content

Instantly share code, notes, and snippets.

Petr Kessler uestla

Block or report user

Report or block uestla

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View time-permutations.php
<?php
$counter = 0;
for ($i = 0; $i <= 2359; $i++) {
$n = str_pad($i, 4, '0', STR_PAD_LEFT);
$ciphers = str_split($n);
if ($ciphers[2] > 5) {
continue ;
View recaptcha-nette-ajax.html
<script type="text/javascript">
(function (window, $) {
window['grecaptchaInit'] = function () {
$.nette.ext({
init: function () {
$('.g-recaptcha').each(function () {
var recaptcha = $(this);
if (recaptcha.children().length) { // already processed -> skip
return ;
View lidstina.tex
\documentclass[a4paper]{article}
\usepackage[czech]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{fullpage}
@uestla
uestla / jquery.nette.forms.live.js
Last active Dec 10, 2015
Nette+jQuery live form validation
View jquery.nette.forms.live.js
(function ($, window) {
if (!window.Nette) {
console.log('Error: Nette form validation not loaded.');
return ;
}
var live;
View example.php
require_once __DIR__ . '/geocaching.php';
var_dump( getFoundCacheCount( '3f4da330-f5d0-411d-bcee-74672b284351' ) );
View AntispamControl.php
<?php
use Nette\Forms\Form,
Nette\Forms\Controls\TextInput;
class AntispamControl extends TextInput
{
/**
* @return void
@uestla
uestla / jquery.nette.js
Created Apr 12, 2012
Ajax s jQuery (Nette framework addon)
View jquery.nette.js
(function ($, window) {
$(function () {
// navazani validate Nette formularu
$('form').livequery(function () {
var $this = $(this);
Nette.initForm($this[0]);
});
View INavigationControl.php
<?php
interface INavigationLoader
{
/** @return Nette\ArrayHash */
function loadNavigation();
}
View FilterRoute.php
<?php
namespace Kdyby\Application\Routers;
use Nette;
use Nette\Application;
class FilterRoute extends Nette\Application\Routers\Route
You can’t perform that action at this time.