Skip to content

Instantly share code, notes, and snippets.

@cdata
cdata / mobilegmailinbox.html
Created January 16, 2011 23:11
This is a dump of the inbox view for Google's mobile-optimized Gmail application
<!DOCTYPE html>
<html manifest="https://mail.google.com/mail/mu/manifest">
<head>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
<script>
@cdata
cdata / homesetup.sh
Last active September 24, 2015 22:07
Setup a familiar environment in one line!
wget https://raw.github.com/cdata/setup/master/setup.sh && chmod +x ./setup.sh && ./setup.sh
@cdata
cdata / xcodeinstaller.sh
Created February 9, 2011 01:02
Snippet for unattended installation of XCode
#!/bin/bash
# This snippet should hypothetically allow a totally unattended
# installation of Apple's XCode. After prompting for credentials,
# the script simulates a login, begins a download and subsequently
# mounts the disk image and installs XCode to the default location.
echo -n "ADC login: "
read login
echo -n "ADC password: "
@cdata
cdata / strangesyntax.js
Created February 15, 2011 23:10
This is a very strange syntax using a combination of colon and brackets. Anyone know its purpose?
a: {
var x=1;
var y=2;
};
@cdata
cdata / detectshiftreload.js
Created June 1, 2011 01:01
Poor man's shift+reload detection
var toggle = false,
keyHandler = function(event) {
toggle = event.shiftKey;
},
unloadHandler = function() {
if(toggle) {
// Do stuff here..
@cdata
cdata / package.json
Created July 5, 2011 02:40
Skeleton for package.json
{
"name" : "SomeName",
"description" : "A description.",
"keywords" : ["some", "name", "foo", "bar"],
"homepage" : "http://some.name/",
"version" : "1",
"author" : {
"name" : "Christopher Joel",
"email" : "chris@scriptolo.gy",
"url" : "http://scriptolo.gy"
@cdata
cdata / renderer.js
Created July 24, 2011 07:18
Chronicle renderer test
(function(window, document) {
var style = document.createElement('style');
style.setAttribute('type', 'text/css');
style.textContent = "body { display: none; }";
document.getElementsByTagName('head')[0].appendChild(style);
})(window, document);
@cdata
cdata / gallery.html
Created August 26, 2011 02:59
Gallery HTML Snippet
@cdata
cdata / gallery.js
Created August 26, 2011 03:02
Gallery JavaScript Snippet
@cdata
cdata / cloudflare.html
Created August 31, 2011 22:36
Sample CloudFlareJS Configuration and Embeddable Snippets
<!-- CloudFlareJS live deployment snippet -->
<script type="text/javascript">
//<![CDATA[
/* Options reference
*
* verbose boolean Toggles verbose logging.
* p int Timestamp prior to which cached content is invalid.
* byc boolean Set to true to bypass local storage caching.
* bag string The path prefix for the bag endpoint.
* owl string The path prefix for the owl endpoint. Set falsey to disable.