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/env python | |
""" Convert values between RGB hex codes and xterm-256 color codes. | |
Nice long listing of all 256 colors and their codes. Useful for | |
developing console color themes, or even script output schemes. | |
Resources: | |
* http://en.wikipedia.org/wiki/8-bit_color | |
* http://en.wikipedia.org/wiki/ANSI_escape_code |
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
// checksum calculation for GTIN-8, GTIN-12, GTIN-13, GTIN-14, and SSCC | |
// based on http://www.gs1.org/barcodes/support/check_digit_calculator | |
function isValidBarcode(barcode) { | |
// check length | |
if (barcode.length < 8 || barcode.length > 18 || | |
(barcode.length != 8 && barcode.length != 12 && | |
barcode.length != 13 && barcode.length != 14 && | |
barcode.length != 18)) { | |
return false; | |
} |
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> | |
<head> | |
<title>Stay Standalone</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<script src="stay_standalone.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<ul> | |
<li><a href="http://google.com/">Remote Link (Google)</a></li> |
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
// | |
// UIImage+JTImageDecode.h | |
// | |
// Created by james on 9/28/11. | |
// http://ioscodesnippet.tumblr.com | |
// | |
@interface UIImage (JTImageDecode) | |
+ (UIImage *)decodedImageWithImage:(UIImage *)image; | |
@end |
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
#Sass Snippets | |
snippet @i | |
@import "${1}"; | |
snippet ext | |
@extend ${1}; | |
snippet inc | |
@include ${1}(${2});${3} | |
snippet @m | |
@media ${1} { | |
${2} |
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
""" | |
A really stupid python template language inspired by coffeekup, markaby. | |
Do not use this code, it will ruin your day. A byproduct of insomnia. | |
TL;DR | |
----- | |
This module defines a template language that allows us to do: | |
d = Doc() |
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
/** | |
* Lined paper that follows the text | |
* Support: Chrome, FF 3.6+, Saf 5.1+, Opera 11.50+, IE10 | |
*/ | |
/* Just decorative */ | |
padding: 20px; | |
/* The font. Try changing font-size and see how the lines |
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
/* | |
NOTE!!!! | |
The most updated version of this code is here: | |
https://github.com/scottjehl/iOS-Orientationchange-Fix |
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
From: Chris DeSalvo <[email protected]> | |
Subject: Why we can't process Emoji anymore | |
Date: Thu, 12 Jan 2012 18:49:20 -0800 | |
Message-Id: <[email protected]> | |
--Apple-Mail=_6DEAA046-886A-4A03-8508-6FD077D18F8B | |
Content-Transfer-Encoding: quoted-printable | |
Content-Type: text/plain; | |
charset=utf-8 |
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
if (typeof (AC) === "undefined") { | |
AC = {} | |
} | |
AC.ImageReplacer = Class.create({ | |
_defaultOptions: { | |
listenToSwapView: true, | |
filenameRegex: /(.*)(\.[a-z]{3}($|#.*|\?.*))/i, | |
filenameInsert: "_☃x", | |
ignoreCheck: /(^http:\/\/movies\.apple\.com\/|\/105\/|\/global\/elements\/quicktime\/|_(([2-9]|[1-9][0-9]+)x|nohires)(\.[a-z]{3})($|#.*|\?.*))/i, | |
attribute: "data-hires", |
OlderNewer