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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Xp - agile programming tools in Coffeescript

16 点作者 reddittor大约 14 年前

2 条评论

keyist大约 14 年前
For the love of Kernighan &#38; Ritchie, please do not promote this as "a convenience library aimed towards non-expert users." The only way beginners are going to learn is experimenting with the command line, not having their hands held with a tiny subset of what's available.<p>And the positioning -- what's agile about knowing your public ip or uploading images to imgur? Is this a belated April Fool's day joke I'm not getting?<p>Ok, now that I'm done venting, here's the *nix equivalents for all but the pair command (will edit in. EDIT: added. also did s/python2/python):<p><pre><code> # base64 is already a command, supports -d function imgur_up() { curl -F key=yourkeyhere -F "image=@$1" http://api.imgur.com/2/upload } function public_ip() { curl -sL myip.dk | egrep '[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' } function sloc() { sed '/^$/d' $1 | wc -l } # no args clears users # with args, assigns usernames function gpair() { if [ -z "$1" ]; then echo "Resetting to default user" git config --unset-all user.name else git config user.name "$(echo $@)" fi echo "User is now: $(git config user.name)" } function tab_to_space() { sed 's/\t/ /g' $1 } function space_to_tab() { sed 's/ /\t/g' $1 } function url_decode() { echo "$1" | python -c 'import sys,urllib;print urllib.unquote(sys.stdin.read().strip())' } function url_encode() { echo "$1" | python -c 'import sys,urllib;print urllib.quote(sys.stdin.read().strip())' } function web_serve() { python -m SimpleHTTPServer } </code></pre> EDIT: Brought to my attention: <a href="http://news.ycombinator.com/item?id=1448309" rel="nofollow">http://news.ycombinator.com/item?id=1448309</a> =\
评论 #2412564 未加载
评论 #2410526 未加载
评论 #2411625 未加载
jesusabdullah大约 14 年前
Truth be told, if anyone actually gets butthurt because xp duplicates functionality found elsewhere, then they're just being silly. People duplicate functionality all the time. In a lot of cases, we just call it "competition."<p>So, here's a question: I've noticed that the nodejitsu guys usually use Cloudhead's node-static for static file serving. On the other hand, I usually use Connect's staticProvider. Why do they use node-static over staticProvider? Also, can node-static be used as Connect middleware? Given that fileServer.serve seems to take "req" and "resp" arguments it would seem so, but I also see it being used with the stock http interface in all the examples.
评论 #2410398 未加载