Skip to content

Instantly share code, notes, and snippets.

View ttahmouch's full-sized avatar

Tony Tahmouch ttahmouch

View GitHub Profile
Pod::Spec.new do |s|
s.name = "phonegap-plugin-contentsync"
s.version = "1.2.5.cocoapods"
s.summary = "Download and cache remotely hosted content."
s.description = "Download and cache remotely hosted zipped content bundles, unzipping automatically."
s.homepage = "https://github.com/phonegap/phonegap-plugin-contentsync"
s.author = "Adobe PhoneGap Team"
s.license = "Apache License, Version 2.0"
s.platform = :ios
/**
Code Point (Base 16) Code Unit (Base 2) Code Unit (Base 16)
0x000000 - 0x00007F 0xxx xxxx 0x00
0x000080 - 0x0007FF 110x xxxx 10xx xxxx 0xC0 0x80
0x000800 - 0x00FFFF 1110 xxxx 10xx xxxx 10xx xxxx 0xE0 0x80 0x80
0x010000 - 0x10FFFF 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx 0xF0 0x80 0x80 0x80
Encoding a UTF-8 character:
1. Determine the Code Unit required using the Code Point.
2. Push in the bits marked x from the bits of the Code Point.
<!DOCTYPE html>
<html>
<head>
<title>Coast Browser</title>
</head>
<body>
<script src="http://127.0.0.1:8080/ua"></script>
<script>
(function (window) {
window.onload = function () {
@ttahmouch
ttahmouch / rest-client-example
Created August 20, 2014 04:10
Compare RESTful API Client with RESTless API Client
<!DOCTYPE html>
<html>
<head>
<title>Coast Browser</title>
</head>
<body>
<script src="http://127.0.0.1:8080/ua"></script>
<script>
/**
* @param window represents a window containing a DOM document.
@ttahmouch
ttahmouch / uri.js
Last active August 29, 2015 14:04
RFC 3986 URI En/Decoding in Javascript (Node and Browser)
/**
* A Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical
* resource.
* @example "http://www.google.com:80/search?query=text#result"
*
* @return {Uri}
* @constructor
*/
function Uri() {
return this;