Skip to content

Instantly share code, notes, and snippets.

public Post GetMostRecentPost()
{
Post mostRecentPost;
using(var db = Mongo.Create("mongodb://localhost/BlogApp"))
{
var posts = db.GetCollection<Post>();
//create a LINQ queryable to search the DB.
var q = posts.AsQueryable();
@abolibibelot
abolibibelot / dlfree.py
Last active December 11, 2015 21:58
requests API >= 0.13.6 mandates passing prefetch=False when accessing the raw response as a file like object... (see https://github.com/kennethreitz/requests/issues/825 )
import requests
import re
import os
import sys
def getFile( id ):
url = 'http://dl.free.fr/%s' % id
# get initial link