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
<?php | |
$file = new SplFileObject("mybigfile.csv"); | |
// Store flags and position | |
$flags = $file->getFlags(); | |
$current = $file->key(); | |
// Prepare count by resetting flags as READ_CSV for example make the tricks very slow | |
$file->setFlags(null); |
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
$ wget http://example.com/project.2010-06-01.zip | |
$ unzip project.2010-06-01.zip | |
$ cp -R project.2010-06-01 project-my-copy | |
$ cd project-my-copy | |
$ (change something) | |
$ diff project-my-copy project.2010-06-01 > change.patch | |
$ (email change.patch) |
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
function throttle( fn, time ) { | |
var t = 0; | |
return function() { | |
var args = arguments, ctx = this; | |
clearTimeout(t); | |
t = setTimeout( function() { | |
fn.apply( ctx, args ); | |
}, time ); | |
}; |