Created
February 9, 2016 12:51
-
-
Save onion2k/2e7fe16d1bb568271f32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A bitbar plugin to display your HN karma.