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
| <?php | |
| Response::macro('streamed', function($type, $size, $name, $callback) { | |
| $start = 0; | |
| $length = $size; | |
| $status = 200; | |
| $headers = [ | |
| 'Content-Type' => $type, | |
| 'Content-Length' => $size, |
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
| /* @var Full\Path\To\Namespace\Document $document */ | |
| $document = Document::create(); |
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
| ➜ windsor git:(master) ✗ npm update --loglevel=silly | |
| npm info it worked if it ends with ok | |
| npm verb cli [ '/usr/local/Cellar/node/0.10.21/bin/node', | |
| npm verb cli '/usr/local/bin/npm', | |
| npm verb cli 'update', | |
| npm verb cli '--loglevel=silly' ] | |
| npm info using npm@1.3.11 | |
| npm info using node@v0.10.21 | |
| npm info outdated updating [] | |
| npm verb exit [ 0, true ] |
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
| getZones: function(temp) { | |
| return temp ? this.state.tempZones : this.state.zones; | |
| }, | |
| componentDidMount: function() { | |
| this.setState({ | |
| zones: this.getFeatureData('zones'), | |
| tempZones: this.getFeatureData('zones') | |
| }); | |
| }, | |
| addZone: function() { |
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
| // .. | |
| submitSettings: function(e) { | |
| e.preventDefault(); | |
| console.log($(e.target).serialize()); | |
| }, | |
| render: function() { | |
| //... | |
| <form action="/validate" method="post" onSubmit={this.submitSettings}> | |
| // ... | |
| } |
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
| var ToolboxBlock = React.createClass({ | |
| handleClick: function() { | |
| // need to reference the div here | |
| }, | |
| render: function() { | |
| var type = this.props.type; | |
| var className = 'block block-type-'+type; | |
| var blockId = 'block-'+Math.random(); | |
| return ( |
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
| var Toolbox = React.createClass({ | |
| render: function() { | |
| return ( | |
| <div></div> | |
| ); | |
| } | |
| }); | |
| React.renderComponent( |
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
| $time = '2014-03-30 02:00:00'; | |
| echo strtotime($time)."\n"; | |
| $time = '2014-03-30 01:00:00'; | |
| echo strtotime($time)."\n"; |
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
| matth@darwin:~$ which node | |
| matth@darwin:~$ sudo -s | |
| root@darwin:~# which node | |
| /home/matth/local/bin/node |
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
| data = $('#form').serialize(); | |
| $.ajax({ | |
| type: "POST", | |
| url: "send.php?"+data, |