Skip to content

Instantly share code, notes, and snippets.

Adrian Jones adrianbj

Block or report user

Report or block adrianbj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Kudratullah / unicode2html.php
Last active Feb 22, 2017
Convert UniCode Escape Character to UTF-8
View unicode2html.php
// Works Perfict
function uni2html($string){
//preg_replace(): Compilation failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1.
//so can't use $string = preg_replace('/\\u([0-9A-Za-z]+)/', '&#x$1;', $string); directly.
$string = explode('\\', $string);
$string = implode('%', $string);
$string = preg_replace('/%u([0-9A-Za-z]+)/', '&#x$1;', $string);
return html_entity_decode($string, ENT_COMPAT, 'UTF-8');
jlong / uri.js
Created Apr 20, 2012
URI Parsing with Javascript
View uri.js
var parser = document.createElement('a');
parser.href = "";
parser.protocol; // => "http:"
parser.hostname; // => ""
parser.port; // => "3000"
parser.pathname; // => "/pathname/"; // => "?search=test"
parser.hash; // => "#hash"; // => ""
jakebellacera / ICS.php
Last active Feb 16, 2020
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
View ICS.php
* This is free and unencumbered software released into the public domain.
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
hagenburger / javascript_loader.js
Created Jul 30, 2010
Dynamically load JavaScript files with callback when finished
View javascript_loader.js
// Example:
// With callback (that’s the good thing):
JavaScript.load("", function() {
API.use(); // or whatever api.js provides ...
You can’t perform that action at this time.