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
mkdir /home/$USER/sublime2 && curl http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202%20Build%202181%20x64.tar.bz2 | tar jxv -C /home/$USER/sublime2 && echo "export PATH=\$PATH:/home/\$USER/sublime2/Sublime\ Text\ 2/" >> ~/.bashrc && exit |
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 | |
// Bootstrap the laravel environment for our resque workers. | |
require 'paths.php'; | |
require path('sys').'core.php'; | |
Laravel\Bundle::start(DEFAULT_BUNDLE); | |
\Autoloader::directories(array( | |
path('app').'workers', |
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
#!/bin/sh | |
cd vendor/chrisboulton/php-resque | |
# Replace MyAppName with whatever you want to name this queue | |
QUEUE=MyAppName APP_INCLUDE=../../../resque_bootstrap.php ENV=local php resque.php |
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 | |
class ExampleWorker | |
{ | |
// Resque looks for the "perform" function to "run" the worker, without it the worker won't run | |
public function perform() | |
{ | |
// All of your code should go here | |
// Don't hesitate to split the work into smaller parts |
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 | |
class ExampleTask_Task | |
{ | |
public function run() | |
{ | |
// You can pass arguments into the worker as payload | |
$args = array('name' => 'John Smith'); | |
Resque::enqueue('MyAppName', 'ExampleWorker', $args); | |
echo "Resque job queued.\n"; |
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
# Package Folder/File Structure | |
- src/ | |
- PackageName/ | |
- PackageName.php | |
- PackageClass.php | |
- PackageLib.php | |
- Subfolder/ | |
- OtherLib.php | |
- tests/ | |
- composer.json |
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 # /src/PackageName/Subfolder/OtherLib.php | |
namespace PackageName\Subfolder; | |
class OtherLib | |
{ | |
} |
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
{ | |
"name": "organization/packagename", | |
"description": "A package for the ages.", | |
"authors": [ | |
{ | |
"name": "Main Author", | |
"email": "[email protected]" | |
}, | |
{ | |
"name": "Other Author", |
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 | |
class Todo_Controller extends Base_Controller | |
{ | |
public $restful = true; | |
/** | |
* Show the list of all items | |
*/ | |
public function get_index() |
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
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;font-size:12pt;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/solarized_dark");e.getSession().setMode("ace/mode/php");</script> |
OlderNewer