This is a simple script along with some useful information to help when setting up a Laravel Sail project that was cloned from source control. I made this because I could not find anywhere that explained how to do this and kept running into problems. The main issue was a problem with database authentication. It turns out that when the Docker volume is created for the database for the first time the password that is in the .env file is used, which I usually created after starting Sail for the first time. Another issue was not having access to the Sail binary to start the containers. This is solved by the script by installing the composer dependencies with a disposable container. If you follow the steps below in order you should not run into any issues. Feel free to leave a comment on this Gist if it could be improved.
Discover gists
This file contains 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
// Conversion of interface{} or map[string]interface{} types to protobuf struct ("google/protobuf/struct.proto"). | |
package codec | |
import ( | |
"encoding/json" | |
structpb "github.com/golang/protobuf/ptypes/struct" | |
"google.golang.org/protobuf/encoding/protojson" | |
) |
This file contains 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
# mihomo (Clash Meta) 懒人配置 | |
# 版本 V1.8-240904 | |
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33 | |
# https://obdo.cc/meta | |
# 作者: 笨蛋ovo (bdovo.cc) | |
# Telegram: https://t.me/baka_not_baka | |
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel | |
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta | |
# 转载请保留此注释 | |
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解 |
This file contains 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 | |
/** | |
* WordPress API for creating bbcode like tags or what WordPress calls | |
* "shortcodes." The tag and attribute parsing or regular expression code is | |
* based on the Textpattern tag parser. | |
* | |
* A few examples are below: | |
* | |
* [shortcode /] | |
* [shortcode foo="bar" baz="bing" /] |
This file contains 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 | |
/** | |
* PHP-Shortcode is for creating bbcode like tags or what WordPress calls | |
* "shortcodes." The tag and attribute parsing or regular expression code is | |
* based on the Textpattern tag parser. | |
* | |
* A few examples are below: | |
* | |
* [shortcode /] | |
* [shortcode foo="bar" baz="bing" /] |
This file contains 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 | |
// Features Shortcode | |
function button_shortcode($atts){ | |
extract( shortcode_atts( array( | |
'text' => 'Google', | |
'link' => 'http://google.com', | |
'style' => 'button', |
This file contains 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
<!-- Google tag (gtag.js) --> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){window.dataLayer.push(arguments);} | |
gtag('js', new Date()); | |
gtag('config', 'GA_TRACKING_ID'); | |
</script> |
NewerOlder