Skip to content

Instantly share code, notes, and snippets.

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST";
var encodedBody = UTF8.GetBytes(postBody);
request.ContentLength = encodedBody.length;
var requestStream = request.GetRequestStream();
try
@grantamos
grantamos / ManagedObjectContext.h
Created July 2, 2014 19:34
ManagedObjectContext
//
// ManagedObjectContext.h
//
// Created by Amos, Grant
//
#import <Foundation/Foundation.h>
@interface ManagedObjectContext : NSObject
@grantamos
grantamos / DefaultImageView.java
Created February 21, 2014 21:10
Allows for an ImageView to be reset back to the original src attribute.
import android.content.Context;
import android.util.AttributeSet;
import android.widget.ImageView;
/**
* Created by granta on 2/21/14.
*/
public class DefaultImageView extends ImageView {
private int mCachedResourceId = 0;
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.29.1"></script>
<style type="text/css">
body {
background: #000;
}