Instantly share code, notes, and snippets.

View rem-dia.php
<?php
private function removeDiacritics($str)
{
return strtr($str, "ÁÄČÇĎÉĚËÍŇÓÖŘŠŤÚŮÜÝŽáäčçďéěëíňóöřšťúůüýž", "AACCDEEEINOORSTUUUYZaaccdeeeinoorstuuuyz");
}
View poradi-tymu.sql
CREATE PROCEDURE SP_poradi()
BEGIN
DECLARE s_poradi INT(5);
DECLARE s_body INT(5);
DECLARE temp_body INT(5) DEFAULT 0;
DECLARE s_tym VARCHAR(50);
DECLARE my_rank INT(5) DEFAULT 0;
DECLARE done TINYINT(1) DEFAULT 0;
View Storage.php
<?php
namespace Model;
use Nette;
class DemandStorage extends Nette\Object
{
protected $session;
public function __construct(Nette\Http\Session $session)
View mixins.scss
// Ensure CSS grid works with IE 11 spec.
// https://css-tricks.com/browser-compatibility-css-grid-layouts-simple-sass-mixins/
// sass-lint:disable no-vendor-prefixes, no-duplicate-properties
@mixin display-grid {
display: -ms-grid;
display: grid;
}
// $columns values should be delimited by a space
@mixin grid-template-columns($columns...) {
View slider.js
/**
* Easy slider plug-in pro jQuery
*
* (c) 2012 Drahomír Hanák
*/
(function( $ ) {
var inited = false;
View netteext.js
$.nette.ext('load_nette_after_snippets', {
init: function() {
this.ext('snippets').after(function() {
$.nette.load();
});
}
});
$.nette.init();
View tokenjs.js
/*
* jQuery Plugin: Tokenizing Autocomplete Text Entry
* Version 1.6.2
*
* Copyright (c) 2009 James Smith (http://loopj.com)
* Licensed jointly under the GPL and MIT licenses,
* choose which one suits your project best!
*
*/
;(function ($) {
View boxy.html
<div>text</div>
<div>text</div>
<div>text</div>
View menu.html
<select></select>
<nav>
<ul>
<li><a href="">A</a></li>
<li><a href="">B</a>
<ul>
<li><a href="">A</a></li>
<li><a href="">B</a></li>
View nested.js
$(document).ready(function() {
function getChildren($row) {
var children = [], level = $row.attr('data-level');
while($row.next().attr('data-level') > level) {
children.push($row.next());
$row = $row.next();
}
return children;
}