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
| AuthType Basic | |
| AuthName "Password Protected Area" | |
| AuthUserFile /path/to/.htpasswd | |
| Require valid-user |
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 | |
| ##### find the last modified file (exclude folder) | |
| # show files sorted by modification time in reverse order | |
| alias lsr="ls -ctrla" | |
| lsrexec(){ find . -maxdepth 1 -type f -exec ls -ctrA1 "{}" +; } | |
| lsrlast(){ lsaexec | tail -n1; } | |
| # example to find the last modified file with 'tar' in its name: lsagrep tar | |
| lsrgrep(){ lsaexec | grep $1 | tail -n1; } |
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 laraveldbinfo() { | |
| HOST=`perl -lne 's/(?<!^#)DB_HOST=(.*)/\1/ or next; print' .env` | |
| NAME=`perl -lne 's/(?<!^#)DB_DATABASE=(.*)/\1/ or next; print' .env` | |
| USERNAME=`perl -lne 's/(?<!^#)DB_USERNAME=(.*)/\1/ or next; print' .env` | |
| PASSWORD=`perl -lne 's/(?<!^#)DB_PASSWORD=(.*)/\1/ or next; print' .env` | |
| BACKUP_NAME="$NAME-$(date +%Y%m%d-%s).sql" | |
| echo "password is $PASSWORD" | |
| } | |
| function laraveldblogin() { |
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
| APP_NAME="My Sample Laravel App" | |
| APP_ENV=testing | |
| APP_KEY= | |
| APP_DEBUG=true | |
| APP_URL=http://localhost | |
| LOG_CHANNEL=stack | |
| DB_CONNECTION=mysql | |
| DB_HOST=db-tests |
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: Laravel testing | |
| on: | |
| push: | |
| branches: | |
| - release | |
| jobs: | |
| phpunit: | |
| runs-on: ubuntu-20.04 |
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
| <html> | |
| <title>Firebase Messaging Demo</title> | |
| <style> | |
| div { | |
| margin-bottom: 15px; | |
| } | |
| </style> | |
| <body> | |
| <div id="token"></div> | |
| <div id="msg"></div> |
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
| importScripts("https://www.gstatic.com/firebasejs/7.16.1/firebase-app.js"); | |
| importScripts( | |
| "https://www.gstatic.com/firebasejs/7.16.1/firebase-messaging.js", | |
| ); | |
| // For an optimal experience using Cloud Messaging, also add the Firebase SDK for Analytics. | |
| importScripts( | |
| "https://www.gstatic.com/firebasejs/7.16.1/firebase-analytics.js", | |
| ); | |
| // Initialize the Firebase app in the service worker by passing in the |
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 config = { | |
| messagingSenderId: "YOUR-SENDER-ID", | |
| apiKey: "YOUR_API_KEY", | |
| projectId: "YOUR_PROJECT_ID", | |
| appId: "YOUR_APP_ID" | |
| }; | |
| firebase.initializeApp(config); | |
| </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
| <html> | |
| <title>Firebase Messaging Demo</title> | |
| <style> | |
| div { | |
| margin-bottom: 15px; | |
| } | |
| </style> | |
| <body> | |
| <div id="token"></div> | |
| <div id="msg"></div> |
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
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "os" | |
| ) |
NewerOlder