Skip to content

Instantly share code, notes, and snippets.

@sam
sam / HomepagePresenter.scala
Created April 22, 2014 20:29
Demonstrating different techniques for handling lots of Futures.
object HomepagePresenter {
import newsroom.api
import TupleFutureUnzip._
def apply(context: Context)(implicit ec: ExecutionContext): Future[HomepagePresenter] = {
// prepare all our futures since a for-comprehension would serialize our work (and that would be bad).
val future_Tree = ChanneledPresenter.tree
val future_Bulletin = api.bulletins.current
@NickCraver
NickCraver / BotLovin.cs
Last active January 5, 2023 11:36
Some bot/crawler fun on Stack Overflow. 10 hours of fun, to be precise.
private static readonly string[] tenHoursOfFun =
{
"https://www.youtube.com/watch?v=wbby9coDRCk",
"https://www.youtube.com/watch?v=nb2evY0kmpQ",
"https://www.youtube.com/watch?v=eh7lp9umG2I",
"https://www.youtube.com/watch?v=z9Uz1icjwrM",
"https://www.youtube.com/watch?v=Sagg08DrO5U",
"https://www.youtube.com/watch?v=5XmjJvJTyx0",
"https://www.youtube.com/watch?v=IkdmOVejUlI",
"https://www.youtube.com/watch?v=jScuYd3_xdQ",