// jQuery
$(document).ready(function() {
// code
})
This file contains 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
#!/bin/bash | |
# file name: lesscdir | |
# Compile every .less found under a specified folder | |
# $1 is the folder to search | |
# $2 allows to use a lessc parameters for compiling | |
if [[ -z $1 ]];then | |
echo 'Specify a directory to search' | |
exit |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
This file contains 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
#!/bin/bash | |
### Check the DIR | |
DIR=$(git rev-parse --show-toplevel) | |
### Composer update | |
echo "Updating Composer" | |
if [ -e "$DIR/composer.json" ]; then | |
if [ -d "$DIR/vendor" ]; then | |
composer install |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent