ciaranarcher / hacker_term Goto Github PK
View Code? Open in Web Editor NEWHacker News on the Terminal
License: MIT License
Hacker News on the Terminal
License: MIT License
Immediately upon running the hacker_term
command:
/usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p327-perf/lib/ruby/1.9.1/json/common.rb:148:in `parse': 387: unexpected token at '{"title":""Major service outage"","url":"https:\/\/status.github.com\/messages","score":"61 points","user":"yogipatel","comments":"44 comments","time":"9 hours ago","item_id":"5029160","description":"61 points points by yogipatel 9 hours ago | 44 comments"},{"title":"The Rise and Fall of Languages in 2012","url":"http:\/\/www.drdobbs.com\/jvm\/the-rise-and-fall-of-languages-in-2012\/240145800","score":"32 points","user":"wmat","comments":"14 comments","time":"7 hours ago","item_id":"5029514","description":"32 points points by wmat 7 hours ago | 14 comments"},{"title":"Eve of Disaster","url":"http:\/\/www.foreignpolicy.com\/articles\/2013\/01\/04\/why_2013_looks_a_lot_like_1913?page=full","score":"20 points","user":"ph0rque","comments":"18 comments","time":"6 hours ago","item_id":"5029761","description":"20 points points by ph0rque 6 hours ago | 18 comments"},{"title":"Survey says Facebook still in use by young, but Snapchat\/Instagram are real","url":"http:\/\/blog.garrytan.com\/tenth-grade-tech-trends-my-survey-data-says-s","score":"87 points","user":"garry","comments":"47 comments","time":"15 hours ago","item_id":"5027306","description":"87 points points by garry 15 hours ago | 47 comments"},{"title":"U.S. State Dept Releases 108 Volumes of \u201cForeign Relations of U.S.\u201d as eBooks","url":"http:\/\/www.infodocket.com\/2013\/01\/07\/u-s-state-department-108-volumes-of-foreign-relations-of-the-united-states-now-available-in-two-ebook-formats\/","score":"27 points","user":"tvarchives","comments":"5 comments","time":"7 hours ago","item_id":"5029647","description":"27 points points by tvarchives 7 hours ago | 5 comments"},{"title":"Analysis of Rails XML Parameter Parsing Vulnerability","url":"http:\/\/www.insinuator.net\/2013\/01\/rails-yaml\/","score":"69 points","user":"10char","comments":"2 comments","time":"12 hours ago","item_id":"5028455","description":"69 points points by 10char 12 hours ago | 2 comments"},{"title":"Meet the Man Behind America\u2019s Most Dangerous Mail-Order Kits","url":"http:\/\/www.wired.com\/gadgetlab\/2013\/01\/information_unlimited\/","score":"119 points","user":"jalanco","comments":"45 comments","time":"18 hours ago","item_id":"5026178","description":"119 points points by jalanco 18 hours ago | 45 comments"},{"title":"How To Fire A Co-Founder","url":"http:\/\/blog.eladgil.com\/2013\/01\/how-to-fire-co-founder.html","score":"97 points","user":"eladgil","comments":"25 comments","time":"16 hours ago","item_id":"5026983","description":"97 points points by eladgil 16 hours ago | 25 comments"},{"title":"Giant squid filmed in Pacific depths, Japan scientists report","url":"http:\/\/phys.org\/news\/2013-01-giant-squid-pacific-depths-japan.html","score":"102 points","user":"valuegram","comments":"39 comments","time":"16 hours ago","item_id":"5026950","description":"102 points points by valuegram 16 hours ago | 39 comments"},{"title":"NextId","url":"\/news2","description":"n\/a (HNDroidAPI PHP Parser - FJGProjects)"} (JSON::ParserError)
]}'
from /usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p327-perf/lib/ruby/1.9.1/json/common.rb:148:in `parse'
from /usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.5/lib/hacker_term/page_data.rb:17:in `initialize'
from /usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.5/lib/hacker_term.rb:80:in `new'
from /usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.5/lib/hacker_term.rb:80:in `load'
from /usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.5/lib/hacker_term.rb:11:in `initialize'
from /usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.5/bin/hacker_term:5:in `new'
from /usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p327-perf/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.5/bin/hacker_term:5:in `<top (required)>'
from /usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p327-perf/bin/hacker_term:23:in `load'
from /usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p327-perf/bin/hacker_term:23:in `<main>'
hacker_term
can't find curses
. What is this?
~$ hacker_term
/home/user/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- curses (LoadError)
from /home/user/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/user/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.4/lib/hacker_term/ui.rb:1:in `<top (required)>'
from /home/user/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/user/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/user/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.4/lib/hacker_term.rb:2:in `<top (required)>'
from /home/user/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/user/.rbenv/versions/1.9.3-p362/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/user/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.4/bin/hacker_term:3:in `<top (required)>'
from /home/user/.rbenv/versions/1.9.3-p362/bin/hacker_term:23:in `load'
from /home/user/.rbenv/versions/1.9.3-p362/bin/hacker_term:23:in `<main>'
It appears your proxy is down....
jdyer@retina:~ » gem install hacker_term
Fetching: clipboard-1.0.5.gem (100%)
┌── info ──────────────────────────────┐
J-_-L │ http://github.com/janlelis/clipboard │
├── usage ─────────────────────────────┤
│ require 'clipboard' │
│ Clipboard.copy '42' │
│ Clipboard.paste #=> 42 │
└──────────────────────────────────────┘
Fetching: hacker_term-0.0.6.gem (100%)
Successfully installed clipboard-1.0.5
Successfully installed hacker_term-0.0.6
2 gems installed
jdyer@retina:~ » RezWhack
jdyer@retina:~ » hacker_term 1 ↵
/Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.6/lib/hacker_term/page_data.rb:100:in `block in add_missing_keys!': undefined method `has_key?' for "Missing or Invalid Application API Token":String (NoMethodError)
from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.6/lib/hacker_term/page_data.rb:97:in `each'
from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.6/lib/hacker_term/page_data.rb:97:in `add_missing_keys!'
from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.6/lib/hacker_term/page_data.rb:22:in `initialize'
from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.6/lib/hacker_term.rb:80:in `new'
from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.6/lib/hacker_term.rb:80:in `load'
from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.6/lib/hacker_term.rb:11:in `initialize'
from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.6/bin/hacker_term:5:in `new'
from /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.6/bin/hacker_term:5:in `<top (required)>'
from /Users/jdyer/.rbenv/versions/1.9.3-p429/bin/hacker_term:23:in `load'
from /Users/jdyer/.rbenv/versions/1.9.3-p429/bin/hacker_term:23:in `<main>'
jdyer@retina:~ » vim /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.6/lib/hacker_term/page_data.rb 1 ↵
jdyer@retina:~ » vim /Users/jdyer/.rbenv/versions/1.9.3-p429/lib/ruby/gems/1.9.1/gems/hacker_term-0.0.6/lib/hacker_term/page_data.rb
jdyer@retina:~ »
When I curl your API I see the following
jdyer@retina:~ » curl http://hndroidapi.appspot.com/news/format/json/page/
{"items":["Missing or Invalid Application API Token"]}% jdyer@retina:~ »
Sorry, my mistake. This issue has now been sent as
I've installed hacker_term with the command:
gem install hacker_term.
No warnings during install when starting it gives this:
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in gem_original_require': no such file to load -- json (LoadError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in
require'
from /Library/Ruby/Gems/1.8/gems/hacker_term-0.0.3/bin/../lib/hacker_term/page_data.rb:1
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in
require'
from /Library/Ruby/Gems/1.8/gems/hacker_term-0.0.3/bin/../lib/hacker_term.rb:1
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in
require'
from /Library/Ruby/Gems/1.8/gems/hacker_term-0.0.3/bin/hacker_term:3
from /usr/bin/hacker_term:23:in `load'
from /usr/bin/hacker_term:23
I'm unable to open hacker_term on OS X using iTerm2/Terminal.app:
% hacker_term
Error opening terminal: xterm-256color.
% TERM=xterm hacker_term
Error opening terminal: xterm.
% env
PATH=/Users/alake/.rvm/gems/ruby-1.9.3-p327/bin:/Users/alake/.rvm/gems/ruby-1.9.3-p327@global/bin:/Users/alake/.rvm/rubies/ruby-1.9.3-p327/bin:/Users/alake/.rvm/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/alake/.rvm/bin
TMPDIR=/var/folders/ps/vpt_m9rj6tnbc2h8z7vyb3h40000gn/T/
SHELL=/bin/zsh
HOME=/Users/alake
USER=alake
LOGNAME=alake
SSH_AUTH_SOCK=/tmp/launch-rQvB43/Listeners
Apple_Ubiquity_Message=/tmp/launch-1G7RFZ/Apple_Ubiquity_Message
Apple_PubSub_Socket_Render=/tmp/launch-5xgia3/Render
__CF_USER_TEXT_ENCODING=0x1F5:0:0
COMMAND_MODE=unix2003
TERM_PROGRAM=iTerm.app
LANG=en_US.UTF-8
PWD=/Users/alake
ITERM_PROFILE=Default
TERM=xterm-256color
ITERM_SESSION_ID=w0t2p0
SHLVL=1
OLDPWD=/Users/alake
GREP_OPTIONS=--color=auto
GREP_COLOR=1;32
PAGER=less
LESS=-R
LC_CTYPE=en_US.UTF-8
LSCOLORS=Gxfxcxdxbxegedabagacad
rvm_prefix=/Users/alake
rvm_path=/Users/alake/.rvm
__array_start=1
rvm_bin_path=/Users/alake/.rvm/bin
escape_flag=1
_first=1
_second=2
rvm_version=1.17.3 (master)
rvm_env_string=ruby-1.9.3-p327
rvm_ruby_string=ruby-1.9.3-p327
RUBY_VERSION=ruby-1.9.3-p327
GEM_HOME=/Users/alake/.rvm/gems/ruby-1.9.3-p327
GEM_PATH=/Users/alake/.rvm/gems/ruby-1.9.3-p327:/Users/alake/.rvm/gems/ruby-1.9.3- p327@global
MY_RUBY_HOME=/Users/alake/.rvm/rubies/ruby-1.9.3-p327
IRBRC=/Users/alake/.rvm/rubies/ruby-1.9.3-p327/.irbrc
EDITOR=vim
_=/usr/local/opt/coreutils/libexec/gnubin/env
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.