TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Learn random facts while pulling code changes

53 点作者 medwezys将近 13 年前

8 条评论

dfc将近 13 年前
<i>"you don't type git pull every time, do you?"</i><p>No, I fetch and then merge.<p><i>"Put those to your .bashrc or .zshrc"</i><p>git aliases should be added to gitconfig to avoid muddying the global namespace for commands.
评论 #4336378 未加载
评论 #4335424 未加载
评论 #4335547 未加载
wiredsoul将近 13 年前
If you're going to do this at least put the 'fact' call before the git command, otherwise it seems to defeat the purpose of reading the fact while the git fetch / merge completes.
Avalaxy将近 13 年前
I dont want to spoil the party but:<p>1) You really don't need Git to do this. Can you bind almost anything you like to make a call to this randomfact website. 2) The site doesn't only state facts. It says that elephants are the only animals that can't jump. This is simply not true, because snails for instance are animals as well, and it is proven that they can't jump.
neeee将近 13 年前
The sed doesn't work on my box, here's one that does:<p><pre><code> elinks -dump randomfunfacts.com | sed -n '/^[┌│└]/p'</code></pre>
JReptak将近 13 年前
Only using curl:<p>WARNING: Replace ASTERISK with the asterisk character, keeps italicizing -.-<p>curl -s randomfunfacts.com | grep '&#60;i&#62;' | sed 's/.ASTERISK&#60;i&#62;\(.ASTERISK\)&#60;\/i&#62;.*/\1/'
评论 #4336095 未加载
jenius将近 13 年前
Pretty fun idea, does anyone know of a good way to make this work on osx?
评论 #4335636 未加载
评论 #4335963 未加载
评论 #4335635 未加载
评论 #4335746 未加载
评论 #4335647 未加载
dracoli将近 13 年前
we should merge :] <a href="https://chrome.google.com/webstore/detail/bjkhdklfbghoadcamlpmkafgmehcmima?hl=en-GB&#38;utm_source=chrome-ntp-launcher" rel="nofollow">https://chrome.google.com/webstore/detail/bjkhdklfbghoadcaml...</a>
austinlyons将近 13 年前
I keep pulling even though my repo is up to date. These facts are addicting.