Living in a world full of technology and digital devices today, I constantly feel distracted, unfocused, and lost. The smartphone has become a part of our bodies, and we have already evolved into a new species - cyborgs. We no longer solely rely on our biological brains for looking and thinking; much of our important information is stored in our phones, our new “organ.” However, it is dumb in comparison because the only efficient way to interact with it is to use our fingers, which is much slower than other natural organs connected and controlled by neural networks. I want to get rid of it, but deep down I know I cannot live without it.
After discovering The Light Phone, I realized that we may not rely on apps and information as much as we think. However, despite initially being intrigued, I eventually found myself unable to resist returning to my iPhone 7. This begs the question: why did I make this decision?
The Light Phone
It’s a downgrade of a person’s capabilities. I can no longer take photos wherever I find something interesting, listen to music whenever I feel like it, or call a taxi wherever I want to go.
It shouldn’t be this way when it comes to enhancing our lifestyle. From a young age, I have never held a high opinion of those individuals in history who chose to live in the wilderness as a means to find mental tranquility. I greatly admire those who can actively engage in society while maintaining a clear mind, living in a manner that brings them personal satisfaction.
Years passed, and it suddenly came to the era of LLMs. One day, I found AI Pin, a wearable device made by Humane with the power of OpenAI. My eyes lit up; I sensed a similar aesthetic and philosophy to the Light Phone. However, that was not enough. The AI Pin has no screen, meaning that I cannot interact with it through vision and touch, a significant loss of HCI technology of the past 60 years.
AI Pin
That being said, AI Pin is heading in the right direction, because what wastes our time and distracts us when using smartphones are the tedious and complex operations with apps. LLM excels at converting natural language into a sequence of machine-understandable commands, which is clearly the way to reduce the friction of using a digital device. I feel that the future is near, only a few steps away, but I didn’t expect it to arrive so quickly.
Today, Rabbit R1 has been released, and I view it as a milestone in the evolution of our digital organ.
Rabbit R1
R1 is definitely an upgraded replacement for smartphones. It’s versatile and fulfills all everyday requirements, with an interaction style akin to talking to a human. Other devices, such as the Light Phone and AI Pin, though minimalist and distraction-free, fall short of enabling us to accomplish our daily tasks. The disadvantages outweigh the benefits in the ultimate goal of improving our lifestyle.
So, why is R1 great? In my opinion, it’s primarily due to the two new technologies it employs: Agent and LAM.
The concept of an Agent is simple: you instruct the AI what to do, and it will analyze your words to formulate a clear goal. Subsequently, it breaks this goal down into various tasks, orchestrates the completion of these tasks, and finally assembles the results to fulfill the goal. The Agent resolves the issue of LLM’s inefficiency at task completion. AutoGPT is the first proof-of-concept that has popularized the Agent. From a certain perspective, R1 can be perceived as a physical embodiment of an Agent.
The following is LAM, which I believe is the most impressive and exciting feature in R1’s presentation. LAM, or Large-Action-Model, possesses the capability to comprehend any user interfaces and act accordingly. Utilizing LAM, Rabbit has developed a framework. This endows R1 with its most potent tool - the ability to learn.
With the power of teaching mode, R1 can acquire a new skill simply through screen recording and voice instructions. In the presentation, Jesse showed how to instruct R1 to use Midjourney for creating images from user voice commands. This proves that R1 is not limited to what the developers built in; users can tweak it to tailor it to their own needs. There’s no compromise of losing capacities while maintaining a minimalist shape and intuitive use.
Someone once stated, the primary distinction between humans and robots is self-learning. While R1 cannot learn independently, it certainly serves as a commendable human companion.
Generally, I believe R1 has the potential to change the world. This is a thought that seldom comes to my mind, as I have seen numerous new technologies and inventions. However, R1 is different; it’s not just another device to please a certain niche. It’s meticulously designed to serve one significant goal for all people: to improve lifestyle in the digital world.
/* define settings store hook */exportinterfaceSettings{iconAction: IconActionwindows: WindowData[]}exportconstINITIAL_SETTINGS: Settings={iconAction: IconAction.defaultWindow,windows:[],}exportconstuseSettingsStore=createChromeStorageStateHookSync(STORAGE_KEY,INITIAL_SETTINGS);/* use settings store hook */constPopup=()=>{const[settings,setSettings,isPersistent,error,isInitialStateResolved]=useSettingsStore();if(!isInitialStateResolved){return(<div>loading</div>)}return(...)}
开发 Chrome 扩展越来越成为我的一大爱好。浏览器是我们在赛博世界赖以生存的基本工具,能让它变得更好用,意味着我可以用更短的时间做更多的事,并享受更好的体验。开一个新的 side project,可以让我短暂离开主线任务和生活中的琐事,专注在具体明确的目标上,不仅是精神上的放松,也是对开发技术的淬炼。
虽然是一个简单的任务,但有 AI 的帮助确实加速了生产力,如果我从头看完视频 + 自己写,至少需要 30 分钟,AI 则可以将这个步骤压缩在 5 分钟内完成。
当然了,这对我来说只是一个实验,我并不想完全以这种方式来创作,一则我并非内容农场,我只创作我认为有价值的内容;二则使用 AI 生成并不能帮助我去思考或深入了解问题。写作是一个创造性的过程,我享受它所带来的成就感,甚至挫败感,它们都能使我得到成长。但我依然非常喜欢 GPT AI,因为它会持续优化我的生产力,帮助我分担非创造性劳作,让我能投入更多时间在创造性工作上。这又让我想起那句话,技术本身是无罪的,只看你怎样使用它。任何结果都是使用者的选择,而不能将原因归咎在完成这件事的工具上。
I regularly check new GPT-APT-based products for my awesome list every day. Recently I found Zeeno.ai and Monica. They both look promising but lack the ability to customize API keys, so I left some comments on Product Hunt asking if this feature could be supported. Luckily, they both responded with a positive attitude.
Additionally, the maker of Monica replied:
I’m a bit curious, is using a personal API because the daily free quota is not enough?
This is an interesting question because I initially asked for this feature solely from a developer’s point of view: utilizing my own key would decrease expenses and provide more autonomy. But for product makers, it’s not worth creating a feature for a small group of people with technical background when the majority of users are normal individuals. That seems to be the case, and the common practice for GPT-API-based products is to build a subscription model around the usage amount—a reseller of the upstream API. So why bother telling the user that you can bring your own key if we want them to think highly of our technology?
Well, there are still reasons to do so. Let me explain:
What the user truly cares about is the usability of your product. Although some may not be aware of OpenAI, the number of competitors in the market continues to grow rapidly on a daily basis. Therefore, providing this option will not have a negative effect on how normal individuals think about your product.
The developer’s favor is a cost-free marketing promotion. As a developer, I appreciate transparent and customizable products. I will spare no effort to promote your product for free through writing articles or posting tweets, as long as I find it powerful and customizable, and I believe other developers are the same as me. YouTubers may also appreciate the opportunity to create tutorials teaching their viewers how to use great products for free by utilizing “certain technologies”. We will spread its popularity.
Those willing to invest in a tool are less concerned about API keys, because they prioritize convenience and time over cost. Consequently, we can assume that conversion rates for subscriptions are constant. The more users a product has, the higher the likelihood of gaining subscribers. It’s straightforward logic, isn’t it?
I am aware that, in many cases, backend logic can be too complex to allow for this feature. However, where possible, I recommend enabling the customization of API keys, which would be a mutually beneficial solution for both of us. So, what is your opinion on this?
我们正身处一场技术发展和下放所产生的时代变革之中,作为一个开发者,应该清醒地认识到,我们开发的应用的价值是由所有参与到生成式 AI 与大型语言模型的学术研究、数据训练、软件开发的学者和公司所赋予的。应带着感激和尊敬,挖掘和普及这项技术的价值,使它能够应用在更多的场景中,为更多的人带来便利。这是我关于开发 ChatGPT API 工具的使命和初心。
Prompts for proofreading
说回正题,我来分享下 Popclip Proofreader 所使用的 prompt:
system: I want you act as a proofreader. I will provide you texts and I would like you to review them for any spelling, grammar, or punctuation errors.
user: Proofread the following content and give me the result without extra delarations or comments:
你可能会好奇,user message 似乎已经包含了足够多的信息,为什么还要有个 system message 呢?我的初衷是通过 system message 传递所有的任务要求,我给了它两个指示,1. 检查文字中的拼写、语法、标点错误并更正;2. 返回的信息不要包含额外的评论和声明。第二点的目的是为了避免输出中包含 “Here’s the corrected sentence:” 这样的无用信息,但结果却不甚理想,这种声明仍然时不时会出现。
Many conversations begin with a system message to gently instruct the assistant…
In general, gpt-3.5-turbo-0301 does not pay strong attention to the system message, and therefore important instructions are often better placed in a user message.
也就是说,ChatGPT 对 system message 的遵从程度没有那么高,一些重要的指示最好还是放在 user message 中。所以我最终将第二个指令放在了 user message 中。但其实这么看来,system 更适合在较长的对话中定下基调,而单条信息的查询只用一条 user 来表达是最好的。
user: Please correct the grammar and polish the following sentences, do not provide any translation, comments, or notes, and use the same language as input
user: Revise the following sentences to make them more clear, concise, and coherent (Please note that you need to list the changes and briefly explain why)
在写这篇文章的时候,我产生了一个想法——发起一个名为 Open Prompt 的开源项目,由社区参与者共同收集和维护各种 AI 产品的 prompt,附带详细的说明,供用户和开发者审阅和参考。与 Awesome ChatGPT Prompts 不同的是,每个产品的 prompt 都会有一个单独的页面,大家可以在这里看到 prompt 版本的变化,提交反馈和参与讨论,使这里成为 AI 爱好者们学习和交流的平台。如果读者们对此项目感兴趣,或有不同的想法,欢迎与我联系和讨论。
The market value of AI prompt
上文中提到的,未来或许 prompt 可以直接成为应用,今天就看到了 PromptBase 这个网站,看来 “Prompt as a Service“ 已经指日可待。这个网站可以搜索和买卖各类 AI 产品的 prompts,除了 ChatGPT 和 GPT-3,还有之前备受关注的 text-to-image 领域的 Stable Diffusion, DALL-E, Midjourney 等等。我随便查看了几个 ChatGPT 的,有教你如何赚钱的 “Eary Money Now”, “The Business Genie”,也有自媒体博主非常需要的 “Never Run Out Of Instagram Ideas”, “Social Media Weekly Content”,价格大都在 $1.99 到 $4.99 之间,卖得好的已经有上千次出售。
看来 prompts 真的有很大的商业价值,或许我关于 prompts 与参数透明化的想法太简单了,但我仍然相信开放才是进步的源动力,就像 OpenAI 完全可以给出更高的定价,完全可以不将 API 开放,继续让更多的人购买 ChatGPT Plus,但他们却把 AI 技术下放,使人人都可低价使用和获利。这种做法的背后即便是为了更大更长远的商业利益,也是我所欣赏和赞扬的,并在事实上推动了文明的进步。
// #popclip extension for ChatGPT
// name: ChatGPT Proofreader
// icon: iconify:fluent:calligraphy-pen-24-regular
// language: javascript
// module: true
// entitlements: [network]
// options: [{
// identifier: apikey, label: API Key, type: string,
// description: 'Obtain API key from https://platform.openai.com/account/api-keys'
// }]
constprefixes={"native":"Paraphrase the following sentences to make it more native:\n","revise":"Revise the following sentences to make them more clear concise and coherent:\n","standard":"Correct this to standard English:\n","polish":"Please correct the grammar and polish the following sentences, do not provide any translation, comments, or notes, and use the same language as input:\n","authentic":"Rewrite the text in authentic English:\n","ielts":"Rewrite the text using IELTS standard:\n",}asyncfunctionchat(input,options,lang,prefixName){constopenai=require("axios").create({baseURL:"https://api.openai.com/v1",headers:{Authorization:`Bearer ${options.apikey}`},});letmessagesswitch(lang){case"en":messages=[{"role":"system","content":"I want you act as a proofreader. I will provide you texts and I would like you to review them for any spelling, grammar, or punctuation errors."},{"role":"user","content":`Proofread the following content and give me the result without extra delarations or comments:\n\n${input.text}`},]break;case"zh":messages=[{"role":"system","content":"你是我的写作助手,检查接收到的文字的拼写、语法错误,对其进行润色,向我提供修改后的文字。"},{"role":"user","content":`修改和润色下面的文字,直接输出修改后的结果,不需要额外的声明:\n${input.text}`}]break;}if(prefixName){messages=[{"role":"user","content":`${prefixes[prefixName]}${input.text}`}]}const{data}=awaitopenai.post("/chat/completions",{model:"gpt-3.5-turbo",messages,});constresult=data.choices[0].message;returninput.text.trimEnd()+"\n\n"+result.content.trim();};exports.actions=[{title:"ChatGPT: proofreader en",after:"paste-result",code:async(input,options)=>chat(input,options,"en"),},{title:"native",icon:"text native",after:"paste-result",code:async(input,options)=>chat(input,options,"","native"),},{title:"revise",icon:"circle revise",after:"paste-result",code:async(input,options)=>chat(input,options,"","revise"),},{title:"polish",icon:"square filled polish",after:"paste-result",code:async(input,options)=>chat(input,options,"","polish"),},{title:"ChatGPT: proofreader zh",icon:"square filled 润",after:"paste-result",code:async(input,options)=>chat(input,options,"zh"),},];
Alternative Prompts
本扩展所使用的 prompt 如下:
system: I want you act as a proofreader. I will provide you texts and I would like you to review them for any spelling, grammar, or punctuation errors.
user: Proofread the following content and give me the result without extra delarations or comments:
1. 显式定义角色。在新的 ChatGPT API 中,消息增加了 role 的属性,表示其所属的角色,其中 system 用于定义接口的行为,比如「你是一个写作助手」, user 和 assistant 则用于区分用户输入和模型输出。这使得创造特定需求的助手变得更加清晰明确。 pic.twitter.com/35Yzb4sE4Z
Being in control of my time not only improves my productivity at work, leading to a better life, but also enables me to reach higher levels of self-actualization.
收藏工具 mymind 发布时,距离 ChatGPT 的出现还有一两年时间。mymind 一开始就给自己贴上了 AI 的标签,标榜为新一代的智能收藏工具,做了 AI 分析、摘要、搜索等功能,但整体的市场反响却平平。为何 mymind 没有得到足够多的关注呢?我认为主要是因为在 ChatGPT 之前,AI 被喊了太多年,就像「狼来了」的故事,人们早已失去了开始的好奇心,见怪不怪了。而彼时 AI 技术的确没有突破性的价值,加上过于滥用,最终成了廉价的噱头,在国内科技界尤其如此。
直到 ChatGPT 横空出世,带来了十倍、百倍于之前的 AI 产品的提升,这才重使人们燃起对 AI 的兴趣和热情。而 OpenAI 提供的 API 使任何产品都可以方便地接入,实现接近 ChatGPT 的 AI 功能,大大降低了 AI 技术的应用门槛。此时虽然利好 AI 相关的产品,但 mymind 所宣传的功能不再具有壁垒,未来也没法有很强的竞争力。因此我认为 mymimd 在 AI 上投入是创新的、值得肯定的,但从收益上来看是个失败案例。
In the past week, I’ve been creating a tool to extract the main content of the current web page and convert it to Markdown for archiving purposes.
Currently, I’ve finished a Web app as a Proof-of-Concept or a preview version before the final release.
Its only feature is to extract and download Wikipedia articles to markdown files. So here’s the link:
To put it simply, the goal of the product is to be an alternative to MarkDownload
with more extensibility.
MarkDownload has been an excellent help for archiving content from the web,
but it does not always work well on every website.
Every now and then, I found it gives bad results for some websites such as Wikipedia
(that’s why I take it as an example to work on at the very beginning).
After releasing this web app, I’ll focus on developing the extension and writing documents for the product.
The code is open-sourced here though it has no README by far,
but you can give me your feedback on the issues or reply here if you like.
In the next post, I’ll give a detailed introduction about what Substance really is and how it works.
Until next time, don’t forget to subscribe to my fresh-made newsletter to get the latest update.
Recently I saw an article called Moving away from UUIDs – Neil Madden on Hacker News. The title immediately got my attention since I use UUIDs a lot in various projects, no matter personal or commercial. Whether I’m using it right or wrong is a vital concern from an engineering perspective, so I read it thoroughly and carefully. This article is my summary and thoughts on it.
Overall, the author gives an opinion that using UUIDs for unguessable random string like session tokens or cookies is a bad practice, the reasons are as follows:
UUID is insecure in cryptography. In some situations, an attacker can take only 35 minutes to brute-force guess a valid result.
UUID is inefficient in storing data. Because of its hexadecimal format and the use of extra dashes, a UUID takes 36 characters to represent 16 bytes of data.
As a replacement, the author suggests to use a 20 bytes random string that is URL-safe base64-encoded. Here’s an example comparing with an UUID string:
A 20 bytes random value is almost impossible to guess in a reasonable time.
The length of the string is just 224 characters, resulting in much less storage space than UUIDs.
Generally speaking, I think although the conclusion of not using UUIDs for tokens is correct, the assumption is totally wrong. UUID (Universally unique identifier) as the name says, is an ID which should not be used for cryptographic purposes in the first place. The proper scenario for UUIDs is using it as primary keys in distributed systems, in which it prevents collisions without relying on a centralized identity generator. In contrast, random string has no way to achieve that.
I did learn something new from this article, but it failed to give me anything useful upon my understanding of how UUIDs should be used.
Do not write clickbait posts, as being neutral and accurate is a virtue for engineers.
A while ago, I found my VSCode tab bar (or tool bar) UI was quite unstable. The reason was that extensions may add icons called “action button” on the right side of the tab bar according to the type of the file, so when switching back and forth between different kinds of files, these buttons will either show or hide, making the available spaces for tabs changing constantly. This may not be noticable when you just open a few tabs, but if you have tabs that are enough to take up the spaces of the tab bar, the whole tab bar will be a clown fiesta with the appearace and disappearance of the action buttons. Tabs are flickering due to their width change, the last one could even be pushed to the next line. It’s just so eyes-hurting and annoying.
After realizing who was the culprit, I immediately started to search for a solution. Sadly, VSCode itself did not provide a way to customize the side bar, but I was luck to find an extension called Customize UI, which allows me to inject css into the application, so that hack the UI whatever I want. I installed the two extensions and add the following lines of code in settings.json and boom, the world was quiet again.
But this solution is not perfect, because Customize UI relies on the Monkey Patch Extension to achieve UI hacking, which always requires me to restart the VSCode immediately after I open it. That’s fine, I told myself, as long as I can get ride of those tab bar icons.
Today, I updated VSCode and was surprised to find that VSCode finally implemented a feature called Hide actions from tool bars, it says:
You can now hide actions from tool bars. Right-click on any action in a tool bar and select its hide command or any of the toggle commands. Hidden actions are moved to the … More Actions menu and can be invoked from there.
This means I can hide those buttons without th need of using the clumsy extensions. I tried to right click on an action button and select “Hide …”, it disappeared as expected. Then I uninstalled Customize UI and hide all the action buttons one by one. So yeah, this is the story of how I defeat the VSCode tab bar.
In 2014, we bought the fitness app Moves. It records your daily activity — including walking, cycling and running. We’re deprecating the Moves app and Moves API on July 31.
For static rules, Chrome set a minimum guaranteed limit of 30,000 rules per extension and a total limit of 330,000 rules for all extensions installed by a single user (this also takes into account the limit of 1,000 regexp rules per extension).
预设的过滤器最多 50 个,用户自定义过滤器和规则之和不得超过 5000 个。
blockers must use pre-set filters (no more than 50), and we have to be very selective about which filters will be available to users. Of course, you can still set your own filter manually. But don’t forget the 5000 rule limit on all custom filters and user rules.
When the browser stops the service worker, the extension goes into a kind of sleep mode: the declarative rules work, but the cosmetic rules that are loaded dynamically do not.
在我看来,其实 Manifest V3 的核心非常明确,就是限制扩展对系统资源的使用。一直以来高资源占用都是 Chrome 为人诟病的痛点。相信每个用户都遇到过 CPU 或内存飙升的情景,许多人甚至说 Mac 没有 16G 以上的内存不要用 Chrome。而扩展由于在后台运行,如果出现问题,更是难以定位和管理,我想这就是 Google 的工程师想要做出改变的原因。
虽然增加了诸多限制,但我确实感受到 Manifest V3 的一些有益之处:
Service Worker 使得扩展不再能常驻后台,让扩展所占用的资源可以被回收,降低了浏览器整体的开销
Starting in June in Chrome 115, Chrome may run experiments to turn off support for Manifest V2 extensions in all channels, including stable channel.
In January 2024, following the expiration of the Manifest V2 enterprise policy, the Chrome Web Store will remove all remaining Manifest V2 items from the store.
再来看看两年前对废除 Manifest V2 的声明:
January 2023: The Chrome browser will no longer run Manifest V2 extensions. Developers may no longer push updates to existing Manifest V2 extensions.
首先,把产品卖到全世界的是 Apple Inc. 而不是开发者个人。开发者付出 15% 的收入分成为代价,使用苹果所建立的全球化合规和销售渠道。开发者不是自由的,甚至无法以苹果以外的方式为收款渠道。从生意的角度讲,这并不是什么坏事,各取所需互惠互利罢了。但是,一个人把 App 放在 Apple 商店向全世界销售这件事,不应该用于评价「全球化」是如何的。
所以这是全球化的奇迹吗?这只是苹果强大的市场能力的体现。实现全球化的是 Apple 而不是我们个人,Apple 与开发者之间只是一种商业关系。如果有一天,Apple 对来自中国的开发者采用更严格的限制政策,一切都可能成空。
真正的全球化,是个人触及世界各地的渠道和能力。在 Apple 这个渠道之外,个人开发者想要将自己的产品卖向全世界,仍是步履维艰。
Separate the processes of creation from improving. You can’t write and edit, or sculpt and polish, or make and analyze at the same time. If you do, the editor stops the creator. While you invent, don’t select. While you sketch, don’t inspect. While you write the first draft, don’t reflect. At the start, the creator mind must be unleashed from judgement.
另一个例子是 Super 创始人 @traf,下面是他的离职声明的摘录,可以从中窥见创业者内心世界的一角:
Super was the first idea of many, and since it started working right away, it demanded all my attention (which I happily gave it).
Because of that, none of my other ideas saw the light of day, and over time, the itch to keep building things kept growing, until the urge got big enough for me to do something about it.
The success from Super and other products gave me the privilege to step back, reset back to zero, and think through what I want to build next.
很精彩的小品番,只有3集,令人意犹未尽。原作漫画的作者是久保带人,代表作是《死神》。在这个新人只会画异世界的时代,只有老一辈艺术家还在继续着纯粹的、不受约束的幻想。以及我再次感受到日本人「边境心态」的优点,不需要对英国的魔法和童话体系有多么深刻的理解,不用怕 Harry Potter 珠玉在前,想画什么就画什么完事了。这并不是对文化的源流缺少敬畏,恰恰相反,作者的心中其实并没有「我」的位置,「我」是一个边境人,没有政治立场或民族情绪。故能对所有的文化一视同仁,以纯粹的热爱,将「我」的认知糅合想象力,创造出新的世界。《来自深渊》和《宝石之国》在我看来也都是在这样的心态下才能创造出的,瑰丽奇幻的世界。(这两部的作者都是女性漫画家,究竟是巧合还是必然呢?)
在 Hacker News 发现这个网站,作者用 Unity 写了一个名叫 Shop Different 的「游戏」,以第一人称视角游览不同时期的 Apple Store。我在这座数字博物馆中流连忘返了一个晚上,还发现了之前未曾听过的 iBook 笔记本电脑 20。
VLC & LibVLC
过去一年我的主要观影工具是 Plex,时常会遇到一些视频无法播放的问题,开始我怀疑是 NAS 硬件的问题,经过仔细检查发现,大多数情况都是在串流 1080p 码率的原始视频文件时,客户端解码出错。于是我给电视的安卓系统安装了 VLC,测试发现同样的文件都可以播放,这才意识到是 Plex for Android TV 内置播放器的问题。
最近 Stray 大火,虽然这是款很优秀的游戏,但我心里却不是滋味,因为它和我2020年初就关注的一款游戏 Little Kitty, Big City 太像了。它的开发者只有一个人,所以进展缓慢,但光是预告片就深深吸引了我,我能感觉到作者在其中倾注的对猫咪的爱,相比而言 Stray 只不过是冷冰冰的猫咪走路模拟器。 https://t.co/y0bYNMaiW2
由即时通讯服务提供的插件。这是个顺理成章的思路,对于即时通许服务商来说,可以利用已有的基础设施提供更多的 user engagement,何乐而不为呢。其中最为知名的当属 Facebook,Google 曾经也有,但和 Google Plus 一同被埋葬了。这种评论系统也存在登录方式单一的问题,请谨慎选择。
Comments.app: Telegram 提供的网站评论插件,使用简便,界面美观,支持 dark mode 和 accent color。
/* only return new items */conststaticData=getWorkflowStaticData('global');constlastItemId=staticData.lastItemId;console.log('lastItemId',lastItemId);constfirstItem=items[0];letnewItems=[];functiongetId(item){returnitem.json.id;}if(lastItemId){for(constitemofitems){if(getId(item)===lastItemId){break;}newItems.push(item)}}else{newItems=[firstItem]}staticData.lastItemId=getId(firstItem)// Reverse the order so that items are sent from old to new
returnnewItems.reverse()
经过 Function 的处理后,有效条目会被送往 Telegram node,进行 message 组装,最终发送到频道。
GitHub 可以通过 https://github.com/$username.atom 获取用户公开的动态信息,因此不需要复杂的 API 接入,直接使用 RSS Feed Read 即可获取到我们所需要的数据。
在 Function filter 中,我用正则为动态进行了分类,并组成最终所需的消息格式,代码如下:
/* filter items */constnewItems=[];constregexes={'star':/^reorx starred/,'pull-request':/^reorx opened a pull request/,'issue':/^reorx opened an issue/,}consttagSymbols={'star':'🌟','pull-request':'⤴️','issue':'⚡️'}for(constitemofitems){consttitle=item.json.titlelettag=''for(constkeyinregexes){constregex=regexes[key]if(regex.test(title)){tag=keybreak}}if(tag!==''){item.json.tag=tagitem.json.tgTitle=`${tagSymbols[tag]}${title.replace(/^reorx /,'')} #github #${tag}`item.json.guid=item.json.idnewItems.push(item)}}returnnewItems
这个 workflow 还有一个使用 GitHub API 的版本,但 RSS 可以获得所有动态,更加方便,最终胜出。
曾经我特别痴迷于自己实现工具、制造轮子,现有工具稍有不顺就要全盘抛弃,自己解决。后来我在 happy xiao 的忘记系统一文中看到 John Voorhees 的一段话,改变了我对使用工具的态度:
If there’s anything I’ve learned about productivity systems, it’s that the best one is the one that works for you. Approaching the problem is tricky, but my advice is to use an app first and adopt a system later. That way, you’ll have a better understanding of what your needs are before you dive in.
独立开发者,AKA indie makers, solo developers, or quite-my-job makers,是一群特别的人。他们或厌倦了大厂上班做重复性的工作,或不甘于只作为别人设计的实现者,或想要挑战自己的创造力、寻求被动收入甚至实现财务自由,初始的动机虽然各异,但却有一个共同点:不满足于一件事情已有的做法和存在方式,想用自己的手去改变和创造,实现心中那个理想的产品。
An indie maker is an independent creator. They build projects with their own resources, often without funding, taking care of all aspects: development, design, marketing…