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 | |
// example code | |
setlocale(LC_CTYPE, 'cs_CZ'); | |
$str = "Běloučký kůň úpěl ďábelské ódy $ ' 1234"; | |
preg_replace('/(?<=-)-+/', '', // Replace all duplicase hyphens with one only | |
preg_replace( '/[^-a-z0-9]/', '', // Strip all non-alfanumeric characters or hyphens |
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
// JavaScript | |
document.getElementsByTagName("html")[0].webkitRequestFullScreen(); | |
// document.getElementsByTagName("html")[0].requestFullscreen(); | |
// document.getElementsByTagName("html")[0].msRequestFullscreen(); |
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
# OCR PDF file | |
ocrmypdf -l ces input.pdf output.pdf | |
# -l => language: -l eng+deu, -l ces | |
# --sidecar => Generate text files that contain the same text recognized by OCR | |
# --title TITLE => Set document title (place multiple words in quotes) | |
# --author AUTHOR => Set document author | |
# --subject SUBJECT => Set document subject description | |
# --keywords KEYWORDS => Set document keywords |
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
/*! | |
* jQuery TextChange Plugin | |
* http://www.zurb.com/playground/jquery-text-change-custom-event | |
* | |
* Copyright 2010, ZURB | |
* Released under the MIT License | |
*/ | |
(function ($) { | |
$.event.special.textchange = { |
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
function ptq(q) | |
{ | |
/* parse the query */ | |
/* semicolons are nonstandard but we accept them */ | |
var x = q.replace(/;/g, '&').split('&'), i, name, t; | |
/* q changes from string version of query to object */ | |
for (q={}, i=0; i<x.length; i++) | |
{ | |
t = x[i].split('=', 2); | |
name = unescape(t[0]); |
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
// ==UserScript== | |
// @name Delicious Search Results on Google | |
// @namespace gaillard | |
// @description Shows results from Delicious on Google search pages | |
// @include http://www.google.*/search* | |
// @date 2009-03-07 | |
// @version 0.1 | |
// @GM_version 0.8.20080609.0 | |
// | |
// 99% of the code for this user script comes form markcarey's userscript 'Twitter Search Results on Google' (http://userscripts.org/scripts/show/43451) |
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
mysql -u username -p -h localhost data-base-name < data.sql |
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
// http://interval.cz/clanky/pokrocile-zpracovani-udalosti-napric-platformami/ | |
var events = new Object(); | |
events.addListener = function(element,type,fcn) | |
{ | |
if (!element.addEventListener && !element.attachEvent) return false; | |
if (element.addEventListener) element.addEventListener(type,fcn,false); | |
else if (element.attachEvent) | |
{ |
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 | |
// | |
// This compiler is currently in beta status. | |
// The code is quick and dirty, but it works as far as I know. | |
// Feedback welcome: | |
// http://arantius.com/contact.php | |
// | |
// Released under GPLv2 license. | |
// |
NewerOlder