Skip to content

Instantly share code, notes, and snippets.

@differentmatt
differentmatt / TVMClient.cs
Created December 4, 2012 20:39
AWS Anonymous TVM .NET Client
/* Amazon Web Services (AWS) Anonymous TVM Client
*
* This prototype fetches temporary AWS credentials from an Anonymous TVM service
* as described here:
* http://aws.amazon.com/articles/4611615499399490
* http://aws.amazon.com/code/8872061742402990
*
* The Anonymous TVM service code is here:
* https://github.com/amazonwebservices/aws-tvm-anonymous
*/
@differentmatt
differentmatt / FacebookAuthentication.py
Last active August 20, 2018 19:24
Django Tastypie Facebook Authentication
"""
This allows clients to log into your Django Tastypie APIs with Facebook (i.e.
instead of username/password credentials).
Django-facebook takes care of the communication with Facebook, and updates or
registers users in your system with their Facebook data.
Rough outline:
1. Install django-facebook
2. Use or extend django-facebook's FacebookProfileModel for your Django AUTH_PROFILE_MODULE
@differentmatt
differentmatt / UrlizerTextBox.cs
Created February 2, 2013 21:20
Windows Phone 7 Automatic Hyperlinks in RichTextBox
/* Automatically detects URLs in a RichTextBox and replaces them with clickable Hyperlinks.
*
* Tested on Windows Phone 7.1 (WP7)
*
* Usage:
* <mynamespace:UrlizerTextBox IsReadOnly="True" Content="Check out http://funnel-app.com"/>
* Or using databinding:
* <mynamespace:UrlizerTextBox IsReadOnly="True" Content="{Binding}"/>
*/
using System;
This file has been truncated, but you can view the full file.
Test: text file too large to upload via web form.
This article is about the novel. For the film series, see The Lord of the Rings (film series). For other uses, see The Lord of the Rings (disambiguation).
The Lord of the Rings
Jrrt lotr cover design.jpg
Tolkien's unused cover designs for the three volumes which would later be used for the 50th anniversary editions of the books
Volumes:
The Fellowship of the Ring
The Two Towers
The Return of the King
@differentmatt
differentmatt / filesystem.py
Created August 31, 2014 02:01
Fun interview problem to implement a file system. Required commands listed at top of file.
# filesystem.py
import os.path
import json
import random
# Commands:
# ls (list current contents, no params)
# pwd (print current directory, no params)
# mkdir (make a directory, one param)
# create (create a file, two params: filename contents)