Skip to content

Instantly share code, notes, and snippets.

View tranquangchau's full-sized avatar

Trần Quang Châu tranquangchau

View GitHub Profile
@sourcerebels
sourcerebels / symfony2-create-bundle.sh
Created February 11, 2012 18:00
PHP > Symfony2 > Clear routes and twig templates cache
# Execute this from your Symfony2 path
php app/console cache:clear --env=prod --no-debug
@bohman
bohman / viewport.js
Last active March 15, 2025 07:05
jQuery get viewport size
// -----------
// Debugger that shows view port size. Helps when making responsive designs.
// -----------
function showViewPortSize(display) {
if(display) {
var height = jQuery(window).height();
var width = jQuery(window).width();
jQuery('body').prepend('<div id="viewportsize" style="z-index:9999;position:fixed;top:40px;left:5px;color:#fff;background:#000;padding:10px">Height: '+height+'<br>Width: '+width+'</div>');
jQuery(window).resize(function() {