LMLPHP后院

记录一次 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,这个是修改文件属主,时间相对比较快。

删除流氓北京金山软件的残留文件技术

maybe yes 发表于 2025-02-11 15:50

电脑被小孩无意中安装了金山毒霸,导致垃圾残留特别多。

如何删除 Windows\Program files\Kingsoft 文件夹和里面的 dll 文件。

本来卸载了也就算了,不管了,结果导致我 ssh 无法链接,后面就是一天的折腾。垃圾软件修改了防火墙规则。

删除防火墙残留,kingsoft and tencent。

删除 service.msc 残留。startup 残留。

删除 taskschd .msc 残留。

删除 注册表 regedit 残留。Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Kingsoft and Tencent。然后 剩下一个    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModel\StateRepository\Cache\PackageFamily\Data\89。

WSA adb set activate_vpn allow技术

maybe yes 发表于 2024-09-10 08:49

WSA 的设置

v2rayNG can run on Android Emulators. For WSA, VPN permission need to be granted via appops set [package name] ACTIVATE_VPN allow

C:\Users\PC\AppData\Local\Packages\18184wherewhere.AndroidAppInstaller_4v4sx105x6y4r\LocalState\platform-tools>adb.exe connect 127.0.0.1:58526
* daemon not running; starting now at tcp:5037
* daemon started successfully
connected to 127.0.0.1:58526

C:\Users\PC\AppData\Local\Packages\18184wherewhere.AndroidAppInstaller_4v4sx105x6y4r\LocalState\platform-tools>adb devices
List of devices attached
127.0.0.1:58526 device

adb shell appops set com.v2ray.ang ACTIVATE_VPN allow
2025-10-14 00:06:43 1760371603 0.011169