View opacity.css
opacity: 0.5;
filter: alpha(opacity=50);
-moz-opacity: 0.5;
-khtml-opacity: 0.5;
View mixin-legacy-ie.scss
$default-legacy-ie: 7 8 9 !default;
@mixin legacy-ie($versions: $default-legacy-ie) {
$sel: ();
@each $v in $versions {
$sel: append($sel, unquote('.ie#{$v} &'), comma);
}
#{$sel} {
@content;
View scrolltop.js
if ($('.scrool').length != 0) {
$('.scrool').bind('click',function(event){
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 1500);
event.preventDefault();
});
};
View HTML: List of entities
znak kl.zkratka Alt+# HTML kód název
" ---------- Alt+34 " uvozovka/quote
# Ctrl+Alt+X Alt+35 mřížka/hash/sharp
$ Ctrl+Alt+ů Alt+36 dollar
& Ctrl+Alt+C Alt+38 & ampersand
' ---------- Alt+39 ' apostrof
* Ctrl+Alt+- Alt+42 hvězdička/asterisk
/ ---------- Alt+47 / lomítko/slash
: ---------- Alt+58 dvojtečka/colon
View js-fns-prototypes.js
// stripslashes
String.prototype.stripslashes = function(){
return this.replace(/<.*?>/g, '');
};
String.prototype.htmlspecialchars = function(){
var str = this.replace(/&/g, '&amp;');
str = str.replace(/</g, '&lt;');
str = str.replace(/>/g, '&gt;');
str = str.replace(/"/g, '&quot;');
return str;
View zip-folder.php
<?
class zipuj_helper
{
protected $jmeno_zipu;
protected $root;
protected $zip;
public function __construct($root = ".", $jmeno_zipu = "zip.zip")
{
$this->root = $root;
$this->jmeno_zipu = $jmeno_zipu;
View unzip-folder.php
<?
$extract_dir = "./sprites/";
$extract_file = "sprites.zip";
$zip = new ZipArchive;
$res = $zip->open($extract_file);
if ($res === TRUE) {
$zip->extractTo($extract_dir);
$zip->close();
echo "OK";
} else {
View readable-filesize.php
<?
function HumanReadableFilesize($size) {
// Adapted from: http://www.php.net/manual/en/function.filesize.php
$mod = 1024;
$units = explode(' ','B KB MB GB TB PB');
for ($i = 0; $size > $mod; $i++) {
$size /= $mod;
}
return round($size, 2) . ' ' . $units[$i];
View csv-export.php
<?
$out = '';
$fields = dibi::fetchAll("SHOW COLUMNS FROM web_application");
foreach ($fields as $field)
{
$out .= '"'.$field->Field.'";';
}
$out = rtrim($out, ';');
$out .= PHP_EOL;
foreach ($this->model->csvExport() as $index => $row)
View jquery plugin, function, expression #v2
1/
(function($){
$.extend({
jYoutube: function( url, size ){
if(url === null){ return ""; }
size = (size === null) ? "big" : size;
var vid;
var results;
results = url.match("[\\?&]v=([^&#]*)");
vid = ( results === null ) ? url : results[1];