static public function slugify($text)
{
// replace non letter or digits by -
$text = preg_replace('~[^\pL\d]+~u', '-', $text);
// transliterate
$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
// remove unwanted characters
$text = preg_replace('~[^-\w]+~', '', $text);
// trim
$text = trim($text, '-');
// remove duplicate -
$text = preg_replace('~-+~', '-', $text);
// lowercase
$text = strtolower($text);
if (empty($text)) {
return 'n-a';
}
return $text;
}
2016 m. rugsėjo 5 d., pirmadienis
2016 m. rugpjūčio 9 d., antradienis
2016 m. rugpjūčio 8 d., pirmadienis
bootstrap above fold load ciritical css
https://www.appneta.com/blog/bootstrap-pagespeed/
Enable mod_pagespeed
<IfModule pagespeed_module>
ModPageSpeed on
ModPagespeedRewriteLevel CoreFilters
ModPagespeedEnableFilters prioritize_critical_css
ModPagespeedEnableFilters defer_javascript
ModPagespeedEnableFilters sprite_images
ModPagespeedEnableFilters convert_png_to_jpeg,convert_jpeg_to_webp
ModPagespeedEnableFilters collapse_whitespace,remove_comments
</IfModule>
Minify CSS
yum compress JS and load async
$ cat jquery.js bootstrap.js holder.js > all.js
$ yui-compressor all.js -o all.min.js
Optimize CSS Delivery
Run a Javascript bookmarklet to detect and list CSS that is “above the
fold”
Inline the “above the fold” CSS directly into the HTML
Defer loading the rest of the “below the fold” CSS using a simple, yet
not cross browser compatible solution by Paul Irish
Enable mod_pagespeed
<IfModule pagespeed_module>
ModPageSpeed on
ModPagespeedRewriteLevel CoreFilters
ModPagespeedEnableFilters prioritize_critical_css
ModPagespeedEnableFilters defer_javascript
ModPagespeedEnableFilters sprite_images
ModPagespeedEnableFilters convert_png_to_jpeg,convert_jpeg_to_webp
ModPagespeedEnableFilters collapse_whitespace,remove_comments
</IfModule>
Minify CSS
yum compress JS and load async
$ cat jquery.js bootstrap.js holder.js > all.js
$ yui-compressor all.js -o all.min.js
Optimize CSS Delivery
Run a Javascript bookmarklet to detect and list CSS that is “above the
fold”
Inline the “above the fold” CSS directly into the HTML
Defer loading the rest of the “below the fold” CSS using a simple, yet
not cross browser compatible solution by Paul Irish
arba: https://github.com/addyosmani/critical
2016 m. rugpjūčio 3 d., trečiadienis
bootlint - bootstrap error checker
https://github.com/twbs/bootlint
pakanka i koda ideti eilute
(function(){var s=document.createElement("script");s.onload=function(){bootlint.showLintReportForCurrentDocument([]);};s.src="https://maxcdn.bootstrapcdn.com/bootlint/latest/bootlint.min.js";document.body.appendChild(s)})();
pakanka i koda ideti eilute
(function(){var s=document.createElement("script");s.onload=function(){bootlint.showLintReportForCurrentDocument([]);};s.src="https://maxcdn.bootstrapcdn.com/bootlint/latest/bootlint.min.js";document.body.appendChild(s)})();
2016 m. liepos 13 d., trečiadienis
linux disko dydzio vizualizavimas
[root@297043 ~]# du -h /home/site.com/public_html/darbuotojams | grep '[0-9\.]\+G
2016 m. liepos 12 d., antradienis
2016 m. liepos 7 d., ketvirtadienis
php form security using CSRF, multiple form submission prevent
Užsisakykite:
Pranešimai (Atom)