This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MOBILE = { | |
Android: function() { return navigator.userAgent.match(/Android/i); }, | |
BlackBerry: function() { return navigator.userAgent.match(/BlackBerry/i); }, | |
iOS: function() { return navigator.userAgent.match(/iPhone|iPad|iPod/i); }, | |
Opera: function() { return navigator.userAgent.match(/Opera Mini/i); }, | |
Windows: function() { return navigator.userAgent.match(/IEMobile/i); }, | |
any: function() { return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); } }; | |
if ( MOBILE.any() ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/ruby -w | |
require 'rubygems' | |
require 'rmagick' | |
require 'fileutils' | |
include Magick | |
puts 'Go!' | |
limit = ARGV.length > 1 ? ARGV[1].to_i : 18 | |
file = ARGV[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>KHIM Inspections Installation</title> | |
</head> | |
<body> | |
<h2>Release builds</h2> | |
<a href="itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/u/9675825/manifest.plist">KHIM Inspections v0.2.0</a></body> | |
<h2>Testing builds</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>items</key> | |
<array> | |
<dict> | |
<key>assets</key> | |
<array> | |
<dict> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then | |
// use window.btoa' step. According to my tests, this appears to be a faster approach: | |
// http://jsperf.com/encoding-xhr-image-data/5 | |
function base64ArrayBuffer(arrayBuffer) { | |
var base64 = '' | |
var encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' | |
var bytes = new Uint8Array(arrayBuffer) | |
var byteLength = bytes.byteLength |