Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
# Add correct content-type for fonts | |
AddType application/vnd.ms-fontobject .eot | |
AddType font/ttf .ttf | |
AddType font/otf .otf | |
AddType font/x-woff .woff | |
AddType image/svg+xml .svg | |
# Compress compressible fonts | |
AddOutputFilterByType DEFLATE font/ttf font/otf image/svg+xml |
(function(){ | |
var re = /(^127\.0\.0\.1)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|localhost/; | |
if(re.test(window.location.hostname)) return; | |
var _gaq=[['_setAccount','UA-23156659-1'],['_trackPageview'],['_trackPageLoadTime']]; | |
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1; | |
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js'; | |
s.parentNode.insertBefore(g,s)}(document,'script')); | |
})(); |
<?php | |
/** | |
* Validate JSONP Callback | |
* | |
* https://github.com/tav/scripts/blob/master/validate_jsonp.py | |
* https://github.com/talis/jsonp-validator/blob/master/src/main/java/com/talis/jsonp/JsonpCallbackValidator.java | |
* http://tav.espians.com/sanitising-jsonp-callback-identifiers-for-security.html | |
* http://news.ycombinator.com/item?id=809291 | |
* |
/* | |
* jqGrid - Custom Formatters (mabuCheckboxFormatter, mabuButtonFormatter) | |
* | |
* The event handler will receive two arguments: | |
* $(this) -- jQuery object from the control raising the event. | |
* rowId -- The row id (this could be the row index, or the id of the row if key is specified.) | |
* | |
* | |
* If the event handler is a real function, method invokers for that function are created on $.fn.fmatter.invokers. | |
* They are created once, if you need to reset them for whatever reason you will have to do that yourself. |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
<?php | |
/** | |
* Download helper to download files in chunks and save it. | |
* | |
* @author Syed I.R <[email protected]> | |
* @link https://github.com/irazasyed | |
* | |
* @param string $srcName Source Path/URL to the file you want to download | |
* @param string $dstName Destination Path to save your file | |
* @param integer $chunkSize (Optional) How many bytes to download per chunk (In MB). Defaults to 1 MB. |
<?php | |
// The libxml entity loader is disabled by default | |
// even setting the libxml_disable_entity_loader to false doesn't works! | |
// | |
// @see http://uk3.php.net/manual/en/function.libxml-disable-entity-loader.php | |
// @see http://stackoverflow.com/a/10213239 | |
$dir = __DIR__; | |
$content = 'This is a remote content!'; | |
file_put_contents('content.txt', $content); |