A set of snippets I use in Laravel Nova
cd ./nova
yarn
mv webpack.mix.js.dist webpack.mix.jsLaravel 10+, Horizon 5.x, Redis/Valkey 7+
Prepare application
http://yourapp.com/horizoninactive on horizon dashboardInstall redis-server
| # Change to the project directory | |
| cd $FORGE_SITE_PATH | |
| # Turn on maintenance mode | |
| php artisan down || true | |
| # Pull the latest changes from the git repository | |
| # git reset --hard | |
| # git clean -df | |
| git pull origin $FORGE_SITE_BRANCH |
| #!/bin/bash | |
| # Creator: Phil Cook | |
| # Modified: Andy Miller | |
| # | |
| # >>> IMPORTANT: Moved to: https://github.com/rhukster/sphp.sh | |
| # >>> Kept here for legacy purposes | |
| # | |
| osx_major_version=$(sw_vers -productVersion | cut -d. -f1) | |
| osx_minor_version=$(sw_vers -productVersion | cut -d. -f2) | |
| osx_patch_version=$(sw_vers -productVersion | cut -d. -f3) |
| const ignoreErrors = [ | |
| /^No error$/, | |
| /__show__deepen/, | |
| /_avast_submit/, | |
| /Access is denied/, | |
| /anonymous function: captureException/, | |
| /Blocked a frame with origin/, | |
| /can't redefine non-configurable property "userAgent"/, | |
| /change_ua/, | |
| /console is not defined/, |
| <?php | |
| namespace App\Support; | |
| class Optional | |
| { | |
| /** | |
| * The target being transformed. | |
| * Use _ prefix to avoid namespace conflict on __get() | |
| * |
| <?php | |
| /********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
| /* | |
| * Replace Disallow with Allow Generated Robots.txt | |
| * Credit: Unknown | |
| * Last Tested: June 09 2020 using WordPress 5.4.1 | |
| */ | |
| add_filter('robots_txt','custom_robots'); |
| http://apassant.net/2012/01/16/timeout-for-html5-localstorage/ | |
| var hours = 24; // Reset when storage is more than 24hours | |
| var now = new Date().getTime(); | |
| var setupTime = localStorage.getItem('setupTime'); | |
| if (setupTime == null) { | |
| localStorage.setItem('setupTime', now) | |
| } else { | |
| if(now-setupTime > hours*60*60*1000) { | |
| localStorage.clear() |
$ brew install dnsmasq
...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
/usr/local/etc/dnsmasq.confaddress=/local/127.0.0.1
| exportEvernote() | |
| on exportEvernote() | |
| set outputDir to (do shell script "echo ~/Downloads/") | |
| set theDate to current date | |
| set timeStamp to (do shell script "date +'%y-%m-%d-%T'") | |
| tell application "Evernote" |