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
$ sqlite3 path-to-database-file | |
sqlite> .tables # list tables | |
sqlite> .headers ON | |
sqlite> .mode columns | |
sqlite> PRAGMA table_info(table_name); # table schema | |
sqlite> SELECT type, name, tbl_name FROM sqlite_master WHERE type='index'; | |
# list 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
<?php | |
namespace Test\Http\Controllers; | |
trait AuthHelper | |
{ | |
/** | |
* @var array | |
*/ | |
protected $userPayload = [ |
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 | |
namespace Test; | |
class SeleniumTestCase extends \PHPUnit_Extensions_Selenium2TestCase | |
{ | |
/** | |
* The base URL to use while testing the application. | |
* | |
* @var string |
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
auto_register = new Object(); | |
auto_register.add_member = function(member_id, group_id, ignore, callback) { | |
x = new XMLHttpRequest(); | |
x.onreadystatechange = function() { | |
if (x.readyState == 4) { | |
if (x.status == 200) { | |
if (callback) | |
callback(member_id, group_id); | |
console.log('success', member_id); | |
} else |
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 | |
use Aws\Sns\SnsClient; | |
use Illuminate\Contracts\Broadcasting\Broadcaster; | |
class SnsBroadcaster implements Broadcaster | |
{ | |
/** @var SnsClient */ | |
private $sns; | |
/** @var array */ |
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
// Install SDK | |
// https://github.com/aws/aws-sdk-php-laravel | |
Route::post('sns', function(\Illuminate\Http\Request $request) { | |
$message = json_decode($request->getContent())->Message; | |
Log::info([$request->header('content-type'), $message]); | |
// do some job. | |
return response('', 204); |
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
# $ touch database/database.sqlite | |
# $ php artisan queue:table | |
# $ php artisan queue:failed-table | |
# $ php artisan migrate | |
# $ php artisan make:job DemoJob | |
# $ php artisan tinker | |
# >>> factory(App\User::class)->create(); | |
<?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
node { | |
// https://registry.hub.docker.com/_/maven/ | |
def maven32 = docker.image('maven:3.2-jdk-7-onbuild'); | |
stage 'Mirror' | |
// First make sure the slave has this image. | |
// (If you could set your registry below to mirror Docker Hub, | |
// this would be unnecessary as maven32.inside would pull the image.) | |
maven32.pull() | |
// We are pushing to a private secure docker registry in this demo. |
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 | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel Lumen (5.1.1) (Laravel Components 5.1.*) on 2015-08-18. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { |
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 | |
/** | |
* Slim - a micro PHP 5 framework | |
* | |
* @author Josh Lockhart | |
* @author Andrew Smith | |
* @link http://www.slimframework.com | |
* @copyright 2013 Josh Lockhart | |
* @version 0.1.0 | |
* @package SlimViews |