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
| // ... | |
| let webpack = require("webpack"); | |
| mix.webpackConfig({ | |
| plugins: [ | |
| // Choose the language you want to keep (Ex: "fr") | |
| new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /fr/) | |
| ] | |
| }); |
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
| alias weather='curl -s wttr.in | sed -n "1,7p"' |
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
| docker logs nginx 2>&1 | grep "127." | |
| # ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
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
| [Unit] | |
| Description=Potentially dangerous fix touchscreen after resume on the XPS 13 9350 | |
| After=suspend.target | |
| [Service] | |
| Type=simple | |
| ExecStart=/home/anthony/path/to/xps-touchscreen-workaround.sh | |
| [Install] | |
| WantedBy=suspend.target |
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 | |
| /** | |
| * @author https://github.com/andrieslouw | |
| * @copyright 2016 | |
| **/ | |
| function cfban($ipaddr){ | |
| $cfheaders = array( | |
| 'Content-Type: application/json', | |
| 'X-Auth-Email: your@email.com', |
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\Finite; | |
| /** | |
| * The FiniteAuditTrail Trait. | |
| * This plugin, for the Finite package (see https://github.com/yohang/Finite), adds support for keeping an audit trail for any state machine. | |
| * Having an audit trail gives you a complete history of the state changes in your stateful model. | |
| * Prerequisites: | |
| * 1. Install Finite package (https://github.com/yohang/Finite#readme) | |
| * 2. Use FiniteStateMachine in your model (https://gist.github.com/tortuetorche/6365575) | |
| * Usage: in your Stateful Class use this trait after FiniteStateMachine trait, like this "use FiniteAuditTrailTrait;". |
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 League\Flysystem\Sftp\SftpAdapter; | |
| use Storage; | |
| use League\Flysystem\Filesystem; | |
| use Illuminate\Support\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
| Route::get('redis', array('as' => 'cache', 'do' => function() | |
| { | |
| $redis = Redis::connection(); | |
| //STRING | |
| $redis->set('name', 'Taylor'); | |
| $name = $redis->get('name'); | |
| // LIST | |
| // A list is a series of ordered values. Some of the important commands for interacting with lists are RPUSH, LPUSH, LLEN, LRANGE, LPOP, and RPOP. |
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
| input { | |
| stdin { codec => "plain" } | |
| } | |
| filter { | |
| # Pulls out fields from monolog text log. (Note, we don't send extra to our monolog) | |
| grok { | |
| match => [ "message", "%{MONOLOG} %{GREEDYDATA:mymessage}"] | |
| } |