When building web applications, it can be tricky to get pages to layout correctly, especially when layout can't be done with CSS. Widgets that can dynamically change the layout only complicate matters. JavaScriptMVC 3.1 packs a new resize event that greatly simplifies these layouts.
This file contains hidden or 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
// modified John Resig's http://ejohn.org/projects/flexible-javascript-events/ | |
var div = document.createElement('div'); | |
var addEvent, removeEvent; | |
if ( div.addEventListener ) { | |
addEvent = function( elem, type, fn ) { | |
elem.addEventListener( type, fn, false ); | |
}; |
This file contains hidden or 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
ffmpeg -i out.ogv -s 160x128 -pix_fmt rgb24 -ss 62.6 -t 3 -r 5 -loop 0 -f gif out.gif | |
convert -loop 0 -layers Optimize out.gif outopt.gif |
This file contains hidden or 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
/* | |
Grep.js | |
Author : Nic da Costa ( @nic_daCosta ) | |
Created : 2012/11/14 | |
Version : 0.1 | |
License : MIT, GPL licenses. | |
Overview: | |
Basic function that searches / filters any object or function and returns matched properties. | |
Main area of use would be for DevTools purposes, when needing to find a specific property but only part of |
Authored by Peter Rybin , Chrome DevTools team
In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.
Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example:
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
This file contains hidden or 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
Show hidden characters
# place this in your ST2 'User' folder | |
# eg: /Users/juju/Library/Application Support/Sublime Text 2/Packages/User/compass.sublime-build | |
# | |
{ | |
"cmd": ["compass", "compile", "--boring" ,"$file_name"], | |
"working_dir": "$file_path", | |
"selector": "source.scss" | |
} |
This file contains hidden or 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
# ceci extraira en jpg la premiere image de la video test.mpg | |
vlc.exe -V image --start-time 0 --stop-time 1 --image-out-format jpg --image-out-ratio 24 --image-out-prefix snap test.mpg vlc://quit |