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
| //... | |
| public function register() | |
| { | |
| $this->app->singleton('command.migrate.fresh', function () { | |
| return new FreshCommand(); | |
| }); | |
| } | |
| //... |
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
| public function handle() | |
| { | |
| $key = "charges_loader" . $this->store->id . $this->page; | |
| Redis::throttle($key)->allow(10)->every(60)->then(function () { | |
| echo "HTTP Request Sending...... for page#$this->page \n"; | |
| }, function () { | |
| return $this->release(10); | |
| }); | |
| } |
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\Http\Middleware; | |
| use Closure; | |
| use Illuminate\Http\Response; | |
| /** | |
| * Validate Mailgun Webhooks | |
| * @see https://documentation.mailgun.com/user_manual.html#securing-webhooks |
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
| art() { | |
| # We cheat and assume that artisan is in the root of the repository. Thus the almost any sub directory. :) | |
| if [[ $(git rev-parse --is-inside-work-tree 2>/dev/null) = "true" ]]; then | |
| php `git rev-parse --show-toplevel`/artisan $@ | |
| else | |
| echo "Can't find artisan, are you in a git repository?" | |
| fi | |
| } |
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
| #!/bin/bash | |
| # | |
| # Run this script once per minute | |
| # | |
| # * * * * * /path/to/whois-watch.sh google.com apple.com >> /var/log/whois-watch.log 2>&1 | |
| # update username in mail command | |
| # update sed command depending on server return text | |
| # |
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
| trait HasEnums | |
| { | |
| /** | |
| * The array of enumerators of a given group. | |
| * | |
| * @param null|string $group | |
| * @return array | |
| */ | |
| static function enums($group = null) | |
| { |
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\Http\Middleware; | |
| use Closure; | |
| use Illuminate\Http\Response; | |
| use Illuminate\Cache\RateLimiter; | |
| class ThrottleRequests | |
| { |
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 python | |
| # DESCRIPTION: | |
| # | |
| # This script is meant to be run as a root cronjob. You can run it however frequently | |
| # you desire - I run it every minute. It determines the number of streams, and cross | |
| # references the usernames. If there are duplicate usernames, it checks if the IP | |
| # addresses are different. If so, it generates IPTables rules that will drop packets | |
| # from both IP addresses. | |
| # |
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
| DB_HOST=mysql | |
| DB_DATABASE=homestead | |
| DB_USERNAME=homestead | |
| DB_PASSWORD=secret |