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 | |
| /** | |
| * | |
| * Using CURL to download partial content from a URL | |
| * | |
| * @url file URL to download | |
| * @range_start Start range in bytes | |
| * @range_end End range in bytes | |
| * |
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
| background: url(/assets/img/glitter.gif);background-color: #252830;border-color: #1997c6;border-radius: 0.25rem;color: white;font-weight: bold;letter-spacing: 1px;padding: 0.15rem 0.5rem;text-align: center;text-shadow: 1px 1px 8px #4183D7, -1px -1px 8px #4183D7 , 1px -1px 8px #4183D7 , -1px 1px 8px #4183D7 ;text-transform: capitalize; |
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
| function preg_quote(str, delimiter) { | |
| return (str + '').replace(new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\' + (delimiter || '') + '-]', 'g'), '\\$&') | |
| } |
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 | |
| // Helper usage: | |
| // timeTravel(Carbon::parse('one year ago'), function () {...}); | |
| function timeTravel($target, $callback) { | |
| Illuminate\Support\Carbon::setTestNow($target); | |
| return tap($callback(), function () { | |
| Illuminate\Support\Carbon::setTestNow(); | |
| }); | |
| } | |
| // Macro usage: |
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
| // Add this to the "boot()" method of your "AppServiceProvider" | |
| <?php | |
| \Illuminate\Database\Eloquent\Builder::macro('search', function ($name, $search) { | |
| return $this->where($name, 'LIKE', $search ? '%'.$search.'%' : ''); | |
| }); |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am nathane on github. | |
| * I am nathane (https://keybase.io/nathane) on keybase. | |
| * I have a public key ASDWlm4Hih2sLVgfGKC8TfF-1yh0CI9b2ebzN2rAtrK30Ao | |
| To claim this, I am signing this object: |
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 | |
| //Don't forget to change the namespace! | |
| namespace App\Traits; | |
| use Cron\CronExpression; | |
| use Illuminate\Support\Carbon; | |
| use Illuminate\Console\Scheduling\ManagesFrequencies; | |
| trait Schedulable{ |
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
| const mix = require("laravel-mix"); | |
| const tailwindcss = require("tailwindcss"); | |
| const rootPath = mix.paths.root.bind(mix.paths); | |
| const tailwindPlugins = function (configFile, paths) { | |
| const pluginList = [tailwindcss(configFile)]; | |
| if (mix.inProduction()) { | |
| pluginList.push( | |
| require("@fullhuman/postcss-purgecss")({ |
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
| name: CD | |
| on: | |
| push: | |
| branches: [ production ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: |
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
| <!-- Quantcast Choice. Consent Manager Tag v2.0 (for TCF 2.0) --> | |
| <script type="text/javascript" async="true"> | |
| (function() { | |
| var host = window.location.hostname; | |
| var element = document.createElement('script'); | |
| var firstScript = document.getElementsByTagName('script')[0]; | |
| var milliseconds = new Date().getTime(); | |
| var url = 'https://quantcast.mgr.consensu.org' | |
| .concat('/choice/', 'CUSTOM_ID', '/', host, '/choice.js') | |
| .concat('?timestamp=', milliseconds); |