TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Learn random facts while pulling code changes

53 pointsby medwezysalmost 13 years ago

8 comments

dfcalmost 13 years ago
<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 未加载
wiredsoulalmost 13 years ago
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.
Avalaxyalmost 13 years ago
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.
neeeealmost 13 years ago
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>
JReptakalmost 13 years ago
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 未加载
jeniusalmost 13 years ago
Pretty fun idea, does anyone know of a good way to make this work on osx?
评论 #4335636 未加载
评论 #4335963 未加载
评论 #4335635 未加载
评论 #4335746 未加载
评论 #4335647 未加载
dracolialmost 13 years ago
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>
austinlyonsalmost 13 years ago
I keep pulling even though my repo is up to date. These facts are addicting.