作者: Jet L

  • 【MEME】用APT打开APT.(《APT.》中的Linux梗)

    近日《APT.》这首歌爆火,听着确实洗脑,稍微接触过Linux的人可能立马就能联想到Linux中的APT包管理器,网络上也即刻出现了相关的Linux MEME,比如这条搬运自Reddit的视频:

    其中用Linux命令复刻了一些歌词,让人会心一笑,如果你看不懂的话,让我们一行行看看它究竟哪里好玩:

    视频第一行是一个安装APT包管理器的代码,当然实际安装时候应该是小写的apt,作者应该是为了对应《APT.》这个曲名,将结尾改成了APT.

    这部分对应歌词,当然没有办法实际运行,just for fun!

    对应歌词:Kissy face, kissy face Sent to your phone but,图片意为使用POST方法向服务器IP发送请求,一般的写法是:

    MESSAGE="Hello Wordl!"
    curl -X POST -d "message=$MESSAGE" http://192.168.1.10

    对应歌词:I’m trying to kiss your lips for real,图片中代码是使用Telnet链接远程主机发送明码信息,一般写法是:

    echo "123" | telnet ip.address port

    对应歌词:Red hearts, red hearts,That’s what I’m on yeah

    cd的意思是改变目录,pwd是打印工作目录,用以显示当前工作目录的绝对路径。

    对应歌词:Come give me something I can feel,图片代码运行时候会在终端提示输入信息,前面显示的便是“Come give me something I can feel”,效果类似:

    Come give me something I can feel: [用户输入]

    对应歌词:Don’t you want me like I want you, baby,Don’t you need me like I need you now,图片中的代码前两行提示是没有足够的权限,sudo则是提权操作,还找不到说明对方心里压根没你(笑)

    对应歌词:Sleep tomorrow but tonight go crazy ,图片中代码是启动 10 个并行的进程,每个进程从 /dev/urandom 获取 100 字节的随机数据,然后脚本会暂停 24 小时,最后通过 killall sleep 终止所有 sleep 进程。当然这段你仔细想想,想歪一些会更疯狂(笑)

    对应歌词:All you gotta do is just meet me at the APT.图片中的命令意思是通过命令行与目标主机建立连接,你和我都相聚在APT.嘛这个意思,非常有趣。当然一般的写法是类似:

    ssh APT@192.168.1.100 &

  • 【网站】WordPress使用Google Analytics代码的简单方法

    写在前面:谷歌分析会被浏览器的反广告和反追踪插件屏蔽,因此搜集到的数据可能有很大缺失。

    方法一:通过页眉+自定义HTML实现

    一般的网站页眉部分是统一的,如果不是的话,可以设置一个统一的空白的页眉,只需要将Google Analytics提供的script代码以HTML区块的方式粘贴到页眉部分即可全站启用,并为全站提供分析代码。

    方法二:通过模板函数实现(更推荐)

    使用类似的代码,插入到主题模板函数中,这样可以直接在Header中进行加载。

    // Function to add Google Analytics
    function add_google_analytics() {
        ?>
    <!-- Google tag (gtag.js) -->
        <script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script> // 替换你的ID
        <script>
          window.dataLayer = window.dataLayer || [];
          function gtag(){dataLayer.push(arguments);}
          gtag('js', new Date());
          gtag('config', 'GA_TRACKING_ID'); // 替换你的ID
        </script>
        <!-- End Google Analytics -->
        <?php
    }
    add_action('wp_head', 'add_google_analytics');

  • 【音乐】《Data & Picard》——听不懂,但,好听!

    这首歌曲是 YouTube博主——Pogo 的作品,一首有关《星际迷航》的混音作品,注意是混音作品,所以这流畅的听感,洗脑的旋律,真是太强了。

    作者在作品发布页写道:

    Temba, his arms wide! In Tamarian this signifies the giving of a gift, first heard in the excellent episode Darmok. Data & Picard is my tribute to one of the greatest TV series of all time. It is an original track featuring the voices of Captain Picard (Patrick Stewart) and Commander Data (Brent Spiner), accompanied by a music video I shot entirely in my living room with a green screen and lights.

    The track opens with the Klingon Victory Song, followed by a remix of Data singing Che Gelida Manina in the episode ‘In Theory’. This episode was the first ever to be directed by Patrick Stewart and I didn’t realize this until after the track was finished.

    我是没看过星际迷航的,所以只能写一些关于本曲的感受:

    第一次听:这是什么东西

    第二次听:好像有点意思

    第三次听:se la laaaa-sci riscaldar!

    一种不知道哪里冒出来的,又老又新的奇特感受,同时异常洗脑。

    关于本曲MV:

    作者写道:

    I sourced the Ben Nye makeup that was used to turn Spiner into Data, and a replica of the iconic Star Fleet uniform. Unfortunately I couldn’t get the contact lenses in and I could only get the uniform in red, so I spent a huge amount of time changing the colour of my eyes and uniform in post.

    The video was shot in Slog 4k ProRes HQ using a Sony A7SII and an Atomos Ninja Flame. Lights included 3x Arri 800w Tungstens, 2x Socanland LED banks to light the screen, and one 2000w Blonde to simulate sunlight. BIG thanks to the guys at HD Rentals in Perth for helping me out.