LMLPHP后院

正则表达式记忆备份技术

maybe yes 发表于 2025-10-30 11:10

因为实在查看次数太多,所以保存一份,经常需要确认而查看。

元字符
描述
\
将下一个字符标记为或特殊字符、或原义字符、或向后引用、或八进制转义符。例如,“\\n”匹配\n。“\n”匹配换行符。序列“\\”匹配“\”而“\(”则匹配“(”。即相当于多种编程语言中都有的“转义字符”的概念。
^
匹配输入字行首。如果设置了RegExp对象的Multiline属性,^也匹配“\n”或“\r”之后的位置。
$
匹配输入行尾。如果设置了RegExp对象的Multiline属性,$也匹配“\n”或“\r”之前的位置。
*
匹配前面的子表达式任意次。例如,zo*能匹配“z”,也能匹配“zo”以及“zoo”。*等价于{0,}。
+
匹配前面的子表达式一次或多次(大于等于1次)。例如,“zo+”能匹配“zo”以及“zoo”,但不能匹配“z”。+等价于{1,}。

cloudflare beacon.min.js 如何取消技术

maybe yes 发表于 2025-10-28 12:43

cloudflare 自动添加了 beacon min js 如何取消?

你的站点会自动的出现下面的 Js 代码,默认出现,你没有设置也会出现。代码大致如下:

<script defer src="https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon='{"version":"2024.11.0","token":"f707bd1c6eca478ca6b9abcb70fbf671","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}' crossorigin="anonymous"></script>

记录一次 git 折腾,其实无关 git技术

maybe yes 发表于 2025-08-31 11:46

起源一次温度查看,因为 debian 11 默认没有 .bash_profile,希望登录的时候打印出温度信息,于是在 .bashrc 里面加了一行代码。

cat /sys/class/thermal/thermal_zone0/temp

这一行代码导致 git 无法更新推送代码,SSH 正常登录。

于是,我没有想到是这么个原因。

找了很久的问题,最后发现 ssh 可以正常登录,但是 scp rsync 这些命令都不能正常使用了。

关键是不报错。git 也没有任何报错。并且之前使用 Raspberry Pi 也这么干过,在 .bashrc 里面加过很多代码,都没有出过问题,不过 Debian 10 已经不维护了,更新软件,安装软件都变得非常麻烦。

服务还是自己的最靠谱,第三方服务一定会坏技术

maybe yes 发表于 2025-03-13 13:09

这次栽跟头了,倒在了第三方服务上,第三方的服务终究是靠不住的。

ifconfig.me 之前请求直接返回 IP,现在返回 HTML 文档。这是吃饱了撑的,还是流量大了做出来改变,总之,不靠谱!

让人蛋疼的事,页面的样式做的很丑还撑出框框外面来了,这实在是太不专业了。

<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="content-style-type" content="text/css" />
    <meta http-equiv="content-script-type" content="text/javascript" />
    <meta http-equiv="content-language" content="en" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta name="description" content="Get my IP Address" />
    <meta name="keywords" content="ip address ifconfig ifconfig.me" />
    <meta name="author" content="" />
    <link rel="shortcut icon" href="favicon.ico" />
    <link rel="canonical" href="https://ifconfig.me/" />
    <title>What Is My IP Address? - ifconfig.me</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="./static/styles/style.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">
</head>

<body>
    <div id="ad_container">
        <div class="ad">
            Need a robust API to Geolocate IPs and fetch other crucial information? Try
            <a
                href="https://ipinfo.io/?utm_source=ifconfig.me&utm_medium=referral&utm_campaign=upsell_sister_sites">IPinfo.io</a>.
        </div>
    </div>

    <div id="container" class="clearfix">
        <div id="header">
            <table>
                <tr>
                    <td>
                        <h1><a href="http://ifconfig.me">What Is My IP Address? - ifconfig.me</a></h1>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <div id="plungins">
                            <div class="plungin" id="button_facebook">
                                <div id="fb-root"></div>
                                <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
                                <fb:like href="http://ifconfig.me/" send="false" layout="button_count" width="100"
                                    show_faces="true" font=""></fb:like>
                            </div>

                            <div class="plungin" id="button_twitter">
                                <a href="http://twitter.com/share" class="twitter-share-button"
                                    data-url="http://ifconfig.me/" data-text="What Is My IP Address? - ifconfig.me"
                                    data-count="horizontal"></a>
                                <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
                            </div>

                            <div class="plungin" id="button_plusone">
                                <!-- Place this tag where you want the +1 button to render -->
                                <g:plusone size="medium" href="http://ifconfig.me/"></g:plusone>
                                <!-- Place this render call where appropriate -->
                                <script type="text/javascript">
                                    (function () {
                                        var po = document.createElement('script');
                                        po.type = 'text/javascript';
                                        po.async = true;
                                        po.src = 'https://apis.google.com/js/plusone.js';
                                        var s = document.getElementsByTagName('script')[0];
                                        s.parentNode.insertBefore(po, s);
                                    })();
                                </script>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <div id="info_area">
            <h2>Your Connection</h2>
            <table id="info_table" summary="info">
                <tr>
                    <td class="info_table_label">IP Address</td>
                    <td id="ip_address_cell"><strong id="ip_address">
                            xxx.xxx
                        </strong></td>
                </tr>
                <tr>
                    <td class="info_table_label">User Agent</td>
                    <td>
                        Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
                    </td>
                </tr>
                <tr>
                    <td class="info_table_label">Language</td>
                    <td>
                        en
                    </td>
                </tr>
                <tr>
                    <td class="info_table_label">Referer</td>
                    <td>
                        
                    </td>
                </tr>
                <tr>
                    <td class="info_table_label">Method</td>
                    <td>
                        GET
                    </td>
                </tr>
                <tr>
                    <td class="info_table_label">Encoding</td>
                    <td>
                        gzip, deflate, br
                    </td>
                </tr>
                <tr>
                    <td class="info_table_label">MIME Type</td>
                    <td>
                        text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
                    </td>
                </tr>
                <tr>
                    <td class="info_table_label">Charset</td>
                    <td>
                        
                    </td>
                </tr>
                <tr>
                    <td class="info_table_label">X-Forwarded-For</td>
                    <td>
                        xxx.xxx,34.160.111.145
                    </td>
                </tr>
            </table>
        </div>
        <!--<div id="middle"></div>-->
        <div id="cli_wrap">
            <h2>Command Line Interface</h2>
            <table id="cli_table" summary="cli">
                <tr>
                    <td class="cli_command">$ curl ifconfig.me</td>
                    <td class="cli_arrow">&rArr;</td>
                    <td>
                        xxx
                    </td>
                </tr>
                <tr>
                    <td class="cli_command">$ curl ifconfig.me/ip</td>
                    <td class="cli_arrow">&rArr;</td>
                    <td>
                        xxx
                    </td>
                </tr>
                <tr>
                    <td class="cli_command">$ curl ifconfig.me/ua</td>
                    <td class="cli_arrow">&rArr;</td>
                    <td>
                        Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
                    </td>
                </tr>
                <tr>
                    <td class="cli_command">$ curl ifconfig.me/lang</td>
                    <td class="cli_arrow">&rArr;</td>
                    <td>
                        en
                    </td>
                </tr>
                <tr>
                    <td class="cli_command">$ curl ifconfig.me/encoding</td>
                    <td class="cli_arrow">&rArr;</td>
                    <td>
                        gzip, deflate, br
                    </td>
                </tr>
                <tr>
                    <td class="cli_command">$ curl ifconfig.me/mime</td>
                    <td class="cli_arrow">&rArr;</td>
                    <td>
                        text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
                    </td>
                </tr>
                <tr>
                    <td class="cli_command">$ curl ifconfig.me/charset</td>
                    <td class="cli_arrow">&rArr;</td>
                    <td>
                        
                    </td>
                </tr>
                <tr>
                    <td class="cli_command">$ curl ifconfig.me/forwarded</td>
                    <td class="cli_arrow">&rArr;</td>
                    <td>
                        xxx,34.160.111.145
                    </td>
                </tr>
                <tr>
                    <td class="cli_command">$ curl ifconfig.me/all</td>
                    <td class="cli_arrow">&rArr;</td>
                    <td>
                        
                            ip_addr: xxx
                            <br>
                        
                            remote_host: unavailable
                            <br>
                        
                            user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
                            <br>
                        
                            port: 40220
                            <br>
                        
                            language: en
                            <br>
                        
                            referer: 
                            <br>
                        
                            connection: 
                            <br>
                        
                            keep_alive: 
                            <br>
                        
                            method: GET
                            <br>
                        
                            encoding: gzip, deflate, br
                            <br>
                        
                            mime: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
                            <br>
                        
                            charset: 
                            <br>
                        
                            via: 1.1 google
                            <br>
                        
                            forwarded: xxx,34.160.111.145
                            <br>
                        
                            
                            <br>
                        
                    </td>
                </tr>
                <tr>
                    <td class="cli_command">$ curl ifconfig.me/all.json</td>
                    <td class="cli_arrow">&rArr;</td>
                    <td>
                        {&quot;ip_addr&quot;:&quot;xxx&quot;,&quot;user_agent&quot;:&quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36&quot;,&quot;port&quot;:&quot;40220&quot;,&quot;method&quot;:&quot;GET&quot;,&quot;encoding&quot;:&quot;gzip, deflate, br&quot;,&quot;mime&quot;:&quot;text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7&quot;,&quot;via&quot;:&quot;1.1 google&quot;,&quot;forwarded&quot;:&quot;xxx,34.160.111.145&quot;,&quot;language&quot;:&quot;en&quot;}
                    </td>
                </tr>

            </table>
        </div>
        <div id="footer">&copy; 2024 ifconfig.me</div>
    </div>
</body>

</html>

折腾 Windows NTFS 权限技术

maybe yes 发表于 2025-03-02 14:17

Windows 系统下对移动硬盘的修复工作。记录一下折腾记录。

Windows 修改文件权限的经历,记录一整天的折腾记录。

我觉得挺麻烦,不如 Linux 系列的那么简单干脆。

情况就是移动移动使用 NTFS 文件系统,然后,MacOS 也写入,Linux 也写入,然后又插入 Windows,导致很多奇怪的体验,比如进入文件需要弹框获取权限,有些文件夹进不去,有些文件打不开等等。

右击,Properties,Security,Advanced。此时在最高处 owner 处点击 change 。这个是第一步一定要做的,不然其他步骤做了也没用。

弹出框里面输入本机用户名,千万不要输入 Administrator,不然有些文件依然没法打开。输入后点击 OK,这个是修改文件属主,时间相对比较快。

2025-11-04 03:53:51 1762199631 0.013241