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
| # git colored | |
| # tested in: | |
| # - Ubuntu | |
| # add it to: ~/.bashrc | |
| function parse_git_branch () { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \/\1\//' | |
| } |
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
| sudo chgrp -R www-data storage bootstrap/cache | |
| sudo chmod -R ug+rwx storage bootstrap/cache |
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 | |
| $schedule->call(function () { | |
| DB::table('messages')->delete(); | |
| })->daily(); |
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
| * * * * * cd /home/public_html/projects/my-website && php artisan schedule:run >> dev/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
| <script id="__bs_script__"> | |
| //<![CDATA[ | |
| document.write("<script async src='/browser-sync/browser-sync-client.js?v=2.26.3'><\/script>".replace("HOST", location.hostname)); | |
| //]]> | |
| </script> |
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 gulp = require('gulp'); | |
| var browserSync = require('browser-sync').create(); | |
| gulp.task('default', function() { | |
| browserSync.init({ | |
| server: { | |
| baseDir: "./" | |
| } | |
| }); | |
| gulp.watch("*.html").on('change', browserSync.reload); |
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
| [18:01:40] Using gulpfile ~/httpd/test-browser-sync/gulpfile.js | |
| [18:01:40] Starting 'default'... | |
| [Browsersync] Access URLs: | |
| ------------------------------------ | |
| Local: http://localhost:3000 | |
| External: http://192.168.1.9:3000 | |
| ------------------------------------ | |
| UI: http://localhost:3001 | |
| UI External: http://localhost:3001 |
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
| <script> | |
| var pc = new RTCPeerConnection({iceServers:[]}), noop = function(){}; | |
| pc.createDataChannel(""); //create a bogus data channel | |
| pc.createOffer(pc.setLocalDescription.bind(pc), noop); // create offer and set local description | |
| pc.onicecandidate = function(ice){ //listen for candidate events | |
| if(!ice || !ice.candidate || !ice.candidate.candidate) return; | |
| var myIP = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/.exec(ice.candidate.candidate)[1]; | |
| alert('My IP is: ' + myIP); | |
| pc.onicecandidate = noop; | |
| }; |
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
| export PATH=/usr/local/bin:$PATH | |
| export PATH=~/.config/yarn/global/node_modules:$PATH | |
| alias serve='artisan serve' | |
| alias middleware='artisan make:middleware' | |
| alias migrate="artisan migrate" | |
| alias migrate:s="artisan migrate --seed" | |
| alias autoload="composer dump-autoload -o" | |
| alias db:reset="php artisan migrate:rollback --step && php artisan migrate:refresh && php artisan migrate --seed" | |
| alias model="php artisan make:model" |
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 stopall='docker ps -a -q | xargs -n 1 -P 8 -I {} docker stop {}' | |
| alias removeall='docker ps -a -q | xargs -n 1 -P 8 -I {} docker rm {}' |