- Dynamic Dispatch
- Dynamic Method
- Ghost Methods
- Dynamic Proxies
- Blank Slate
- Kernel Method
- Flattening the Scope (aka Nested Lexical Scopes)
- Context Probe
- Class Eval (not really a 'spell' more just a demonstration of its usage)
- Class Macros
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
| module.exports = { | |
| "src_folders": [ | |
| "tests/nightwatch" // Where you are storing your Nightwatch e2e/UAT tests | |
| ], | |
| "output_folder": "./reports", // reports (test outcome) output by nightwatch | |
| "selenium": { // downloaded by selenium-download module (see readme) | |
| "start_process": true, // tells nightwatch to start/stop the selenium process | |
| "server_path": "/usr/local/bin/selenium-server-standalone.jar", | |
| "host": "127.0.0.1", | |
| "port": 4444, // standard selenium port |
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 args = require('system').args; | |
| var page = require('webpage').create(); | |
| page.viewportSize = { width: 800, height : 400 }; | |
| page.content = '<html><body><canvas id="canvas"></canvas></body></html>'; | |
| // Load the chartjs lib in the page | |
| page.injectJs('./vendor/chart.js/chart.min.js'); | |
| page.evaluate(function (args) { |
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 | |
| if (! function_exists('parity')) { | |
| /** | |
| * Return 'even' or 'odd' por the given number. | |
| * | |
| * @param int $number | |
| * | |
| * @return string | |
| */ |
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
| mysql -p | |
| expect 'Enter password:' | |
| send 'YOUR_MYSQL_PASSWORD' | |
| # Create the development database | |
| CREATE DATABASE IF NOT EXISTS develop | |
| GRANT ALL ON develop.* TO 'forge'@'localhost' | |
| # Create the production database | |
| CREATE DATABASE IF NOT EXISTS production |
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 | |
| namespace App\Models\Traits; | |
| use Ramsey\Uuid\Uuid; | |
| use Illuminate\Database\Eloquent\Model; | |
| trait UuidModel | |
| { | |
| /** |
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 | |
| use Faker\Provider\Base as BaseProvider; | |
| class HtmlProvider extends BaseProvider | |
| { | |
| /** | |
| * @param int $nb | |
| * @param bool $asText | |
| * @return string |
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 | |
| namespace App\Providers; | |
| use Illuminate\Contracts\Http\Kernel; | |
| use Illuminate\Support\ServiceProvider; | |
| use Clockwork\Support\Laravel\ClockworkMiddleware; | |
| use Clockwork\Support\Laravel\ClockworkServiceProvider; | |
| class AppServiceProvider extends ServiceProvider |
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
| #!/usr/bin/env ruby | |
| require 'aws/s3' | |
| class S3Cmd | |
| include AWS::S3 | |
| def initialize | |
| Base.establish_connection!( | |
| :access_key_id => ENV['AWS_ACCESS_KEY_ID'], |