Skip to content

Instantly share code, notes, and snippets.

View jonathands's full-sized avatar

Jonathan DS jonathands

View GitHub Profile
@ViliamKopecky
ViliamKopecky / simple_curl.php
Created May 10, 2012 00:57
Simple cURL wrapper function for GET, POST, PUT & DELETE methods
/**
* Wrapper for easy cURLing
*
* @author Viliam Kopecký
*
* @param string HTTP method (GET|POST|PUT|DELETE)
* @param string URI
* @param mixed content for POST and PUT methods
* @param array headers
* @param array curl options
@andrewspencer
andrewspencer / StringUtil.java
Created May 2, 2011 14:40
Remove accents from a String
package net.andrewspencer.util;
import sun.text.Normalizer; // java.text.Normalizer in 1.6
/**
* Here's how to remove accents in Java 1.5.
* NB Doesn't separate ligatures.
*/
// WARNING Uses unofficial Sun classes, so JVM-dependent.
// Normalizer became standard in Java 1.6, though.