Skip to content

Instantly share code, notes, and snippets.

@onion2k
Created February 9, 2016 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onion2k/2e7fe16d1bb568271f32 to your computer and use it in GitHub Desktop.
Save onion2k/2e7fe16d1bb568271f32 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/node
var request = require('/usr/local/lib/node_modules/request');
var user = "HNUSERNAME";
request('https://hacker-news.firebaseio.com/v0/user/'+user+'.json', function (error, response, body) {
if (!error && response.statusCode == 200) {
var o = JSON.parse(body);
console.log("HN:"+o.karma) // Show the HTML for the Google homepage.
} else {
console.log("Oops");
console.log(error)
console.log(response)
console.log(body)
}
});
@onion2k
Copy link
Author

onion2k commented Feb 9, 2016

A bitbar plugin to display your HN karma.

@sergiotapia
Copy link

noice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment