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
var get_info = function(list_id, callback) { | |
// do something and callback with list_info for list_id; | |
callback(null, list_info); | |
}; | |
var list = [1,2,3,4,5]; | |
for(var i = 0; i < list.length; i++) { | |
var list_id = list[i]; | |
get_info(list_id, function (error, list_info) { | |
// do work on list info and save new data based on list_id; |
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
exports.github = function (req, res) { | |
res.redirect(config.Github.API_ROOT + config.Github.PATH_AUTHENTICATE + '?client_id=' + config.Github.CLIENT_ID); | |
}; | |
exports.githubCallback = function (req, res) { | |
var code = req.query.code; | |
var post_data = querystring.stringify({ | |
code: code | |
, client_id: config.Github.CLIENT_ID |
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
adf |
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
root@ip-10-143-152-37 cassandra]# /usr/local/cassandra/bin/nodetool -h localhost netstatsMode: Bootstrapping | |
Not sending any streams. | |
Nothing streaming from /10.143.152.214 | |
Pool Name Active Pending Completed | |
Commands n/a 0 913 | |
Responses n/a 0 40414 |
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
[root@ip-10-143-152-214 commitlog]# nodetool -h localhost ring | |
Address Status State Load Owns Token | |
147812841064642050890573067299308376119 | |
10.143.152.214 Up Normal 17.63 GB 16.92% 6465521443762750910879932401790818283 | |
10.143.137.229 Up Normal 15.42 GB 14.29% 30770464449828574333878666977671705387 | |
10.189.191.190 Up Normal 14.55 GB 14.29% 55081439847684911199083914992341627091 | |
10.142.148.169 Up Normal 9.89 GB 26.30% 99830924686836618129013673651943109407 | |
10.143.151.252 Up Normal 9.76 GB 12.38% 120896070024475770381967707443124891876 | |
10.143.152.37 Up Joining 6.12 GB 15.82% 147812841064642050890573067299308376119 |
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
SliceQuery<String, String, String> query = HFactory.createSliceQuery(CassandraHelper.keyspace, CassandraHelper.STRING_SERIALIZER, CassandraHelper.STRING_SERIALIZER, CassandraHelper.STRING_SERIALIZER); | |
query.setColumnFamily("user_graph") | |
.setRange("", "", true, 50) | |
.setColumnNames(targetUserId) | |
.setKey(userId + "_" + type); |
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
Darrens-MacBook-Pro:news-collection-client dbounds$ node collector.js nba | |
Requesting page: http://bleacherreport.com/articles/1770310-jim-buss-says-father-jerry-buss-made-final-call-on-mike-dantoni-over-phil-jacks | |
Requesting page: http://bleacherreport.com/articles/1770256-man-buys-300-storage-unit-and-unearths-dikembe-mutombo-memorabilia-collection | |
Requesting page: http://bleacherreport.com/articles/1769525-why-the-minnesota-timberwolves-can-be-legitimate-contenders-in-2013-14 | |
Requesting page: http://bleacherreport.com/articles/1769982-why-dwyane-wade-dictates-lebron-james-long-term-miami-heat-future | |
Requesting page: http://bleacherreport.com/articles/1770100-lebron-james-has-much-to-consider-in-2014-nba-free-agency | |
Requesting page: http://bleacherreport.com/articles/1769737-way-too-early-predictions-for-kobe-bryants-return-to-la-lakers-in-2013-14 | |
Requesting page: http://bleacherreport.com/articles/1769839-why-kobe-bryants-early-return-from-injury-is-exactly-what-the-nba-needs | |
Requesting page: http://bleache |
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
extension Int { | |
func repeat(task: () -> ()) { | |
for i in 0..self { | |
task() | |
} | |
} | |
} | |
500.repeat { | |
println("hello") |
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
baseApp.filter("emptyToEnd", function () { | |
return function (array, key) { | |
var keys = key.split("."); | |
if (!angular.isArray(array)) return; | |
var present = array.filter(function (item) { | |
if(keys.length > 1) { | |
return item[keys[0]][keys[1]]; | |
} else { | |
return item[keys[0]]; |
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
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1>What were you expecting?</h1> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
OlderNewer