Skip to content

Instantly share code, notes, and snippets.

View AnthonyUccello's full-sized avatar

Anthony Uccello AnthonyUccello

View GitHub Profile
@HomerJSimpson
HomerJSimpson / playground.swift
Created October 19, 2015 21:25
POST application/x-www-form-urlencoded via swift
//: Playground - noun: a place where people can play
import UIKit
import XCPlayground
XCPSetExecutionShouldContinueIndefinitely(true)
extension NSMutableURLRequest {
/// Percent escape
@lachlanhurst
lachlanhurst / Simplify.swift
Created February 13, 2015 08:22
Simplification of a 3D polyline using the Ramer–Douglas–Peucker algorithm in Swift
//
// Simplify.swift
//
// Simplification of a 3D-polyline.
// A port of https://github.com/hgoebl/simplify-java for Swift
//
//
// The MIT License (MIT)
//
// Created by Lachlan Hurst on 10/02/2015.
@dpryden
dpryden / ClassLoaderLeakExample.java
Created October 20, 2014 00:01
Example of a ClassLoader leak in Java
import java.io.IOException;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
/**
* Example demonstrating a ClassLoader leak.
*
* <p>To see it in action, copy this file to a temp directory somewhere,
@sinergy
sinergy / new_gist_file
Created May 22, 2013 10:45
Check if Key existed in the JsonData Object of LitJSON (A C# JSON Parser) source: http://goo.gl/NxBcP
static public bool JsonDataContainsKey(JsonData data,string key)
{
bool result = false;
if(data == null)
return result;
if(!data.IsObject)
{
return result;
}
IDictionary tdictionary = data as IDictionary;