- String Calculator http://osherove.com/tdd-kata-1/
- String Calculator With Interactions http://osherove.com/tdd-kata-2/
- Bowling Game Kata http://butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata
- ThePrimeFactorsKata http://butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata
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 -v | |
PHP 5.3.6 (cli) (built: Mar 17 2011 20:58:15) | |
Copyright (c) 1997-2011 The PHP Group | |
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies | |
# echo '<?php $s = array(); for($x=0;$x<1000;$x++){ $s[] = array("name"=>"Adam","age"=>35); }; echo memory_get_peak_usage(); ' | php | |
655040 | |
# echo '<?php $s = array(); for($x=0;$x<1000;$x++){ $o = new ArrayObject; $o->name = "Adam"; $o->age = 35; $s[] = $o;} echo memory_get_peak_usage(); ' | php | |
887984 |
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
var _ = require('lodash'); | |
var arr = [ | |
{"name":"my2child1","title":"My 2 Child 1","parent":"my2"}, | |
{"name":"my2child2","title":"My 2 Child 2","parent":"my2"}, | |
{"name":"parent","title":"A single parent"}, | |
{"name":"child-parent","title":"A child parent","parent":"child1"}, | |
{"name":"my","title":"My"}, | |
{"name":"my2","title":"My2"}, | |
{"name":"child1","title":"Child 1","parent":"my"}, |
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 | |
// Used in https://github.com/im4aLL/roolith-event | |
class Event { | |
private static $events = []; | |
public static function listen($name, $callback) { | |
self::$events[$name][] = $callback; | |
} |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
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 | |
/** | |
* Gera a paginação dos itens de um array ou collection. | |
* | |
* @param array|Collection $items | |
* @param int $perPage | |
* @param int $page | |
* @param array $options | |
* | |
* @return LengthAwarePaginator |
This procedure is tested on Mac OS X 10.14.0 with Xcode Developer Tools installed (xCode).
PHP 5.6, 7.0, 7.1, and 7.2 installed with Homebrew following the instructions here.
Download the following files from Oracle website (yes, you need to create an account and accept terms):
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
'use strict'; | |
module.exports = { | |
types: [ | |
{ | |
value: 'WIP', | |
name : '💪 WIP: Work in progress' | |
}, | |
{ |
- Open Chrome Developer tools and click the Network tab.
- Navigate to the page with the video and get it to start playing.
- Filter the list of files to "m3u8".
- Find master.m3u8 or index.m3u8 and click on it.
- Save the file to disk and look inside it.
- If the file contains a single m3u8 master url, copy that one instead.
- Run the program m3u8x.
- Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
OlderNewer