Taken from: http://www.thesauruslex.com/typo/eng/enghtml.htm
Ć ć Č č Đ đ Š š Ž ž
| #!/bin/bash | |
| # http://stackoverflow.com/questions/3679296/only-get-hash-value-using-md5sum-without-filename | |
| md5HASH=($(md5sum www/app/js/bundle.js| cut -d ' ' -f 1)) | |
| cp www/app/js/bundle.js www/app/js/bundle-$md5HASH.js; | |
| # store in variable in file | |
| echo "<?php define('HASH_EXT', '$md5HASH'); ?>" > www/app/inc/hash-bundle.php; |
| // this is a Bookmarklet | |
| // this must go in the url part of a browser bookmark (without the comments) | |
| javascript: (function() { | |
| var recoveredNumbers = []; | |
| var toPrint = ''; | |
| var elementsSelectorList = ['#fvVisual', '#rvVisual', '#fvTTFB', '#rvTTFB', '#fvStartRender', '#rvStartRender', '#fvRequestsDoc', '#rvRequestsDoc', '#fvBytesDoc', '#rvBytesDoc' ]; | |
| var tableContainer; | |
| var dateElement; | |
| recoveredNumbers.push(document.querySelector('#header_data h2 span').innerHTML); | |
| dateElement = document.querySelector('.heading_details .jsdate'); |
| /** | |
| * Localstorage for webfonts | |
| * WIP | |
| * | |
| * This file should me minified/uglified and injected directly on the head. | |
| * also absolute path to the static server should be used for the css files that get ajaxed. | |
| */ | |
| (function () { | |
| 'use strict'; | |
| // once cached, the css file is stored on the client forever unless |
| /** | |
| * This is a simple list of ES5 JS polyfills and snippets I commonly need to add to code for it to run on IE8 or legacy JS engines. | |
| * No particular order. | |
| */ | |
| // Check for __proto__ support. | |
| function a() {} | |
| if ( (new a).__proto__ === a.prototype ){ | |
| alert('supported'); | |
| }else{ |
Taken from: http://www.thesauruslex.com/typo/eng/enghtml.htm
Ć ć Č č Đ đ Š š Ž ž
| /** | |
| * MIXIN n-of-m-columns | |
| * calculates the adequate percentage width and gutter percentage | |
| * @param $n: number of columns to calculate | |
| * @param $m number of total columns in the row | |
| **/ | |
| $gridGutter: 24px; | |
| $defaultWidth: 984px; | |
| @mixin n-of-m-columns($n:1, $m:3){ |
| .clearfix:after { | |
| content:""; | |
| display:table; | |
| clear:both; | |
| } | |
| /* | |
| From: | |
| http://cssmojo.com/latest_new_clearfix_so_far/ | |
| */ |
| <?php | |
| $url = 'http://g.m0.cl/sistema/ci_assaabloy.zip'; | |
| $path = 'importado.zip'; | |
| $fp = fopen($path, 'w'); | |
| $ch = curl_init($url); | |
| curl_setopt($ch, CURLOPT_FILE, $fp); | |
| $data = curl_exec($ch); |
| <?php | |
| $dir = ".";//"path/to/targetFiles"; | |
| $dirNew = "viejo2014";//path/to/destination/files | |
| // Open a known directory, and proceed to read its contents | |
| if (is_dir($dir)) { | |
| if ($dh = opendir($dir)) { | |
| while (($file = readdir($dh)) !== false) { | |
| echo '<br>Archivo: '.$file; | |
| //exclude unwanted | |
| if ($file=="move.php")continue; |
| <?php | |
| /** | |
| * Útil cuando se necesita calcular el tamaño de un paquete a enviar en el cual | |
| * dentro van N productos con distintas medidas. | |
| * | |
| * Con este algoritmo se puede obtener el tamaño de la caja contenedora final necesaria. | |
| */ | |
| $dimensiones = array(0, 0, 0); // Largo, alto, ancho |