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
<?php | |
// Simple WordPress custom post type example for WP3.0+ | |
// More info at http://curtishenson.com/wordpress-custom-post-types-and-meta-boxes-example | |
//These two lines initiate everything | |
add_action( 'init', 'CHLinksInit' ); | |
function CHLinksInit() { global $ch_links; $ch_links = new CHLinks(); } | |
class CHLinks { |
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
// jQuery image magnifier; jdbartlett's rewrite of Chris Iufer's jLoupe | |
// code: http://gist.github.com/252303 - demo: http://jsbin.com/olado3 | |
// NOTE: this eventually became: http://github.com/jdbartlett/loupe | |
(function($) { | |
$.fn.loupe = function(options) { | |
if (!this.length) return this; | |
options = $.extend({ | |
loupe: 'loupe', | |
width: 200, | |
height: 150 |
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[href^="http:"] { | |
display:inline-block; | |
padding-right:14px; | |
background:transparent url(/Images/ExternalLink.gif) center right no-repeat; | |
} | |
a[href^="mailto:"] { | |
display:inline-block; | |
padding-left:20px; | |
line-height:18px; | |
background:transparent url(/Images/MailTo.gif) center left no-repeat; |
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
// iOS Media Queries | |
// Goal: capture styles for iPhone, iPhone 3G, iPhone 3GS, iPhone 4, iPhone 4S, iPad, and iPad 2 | |
// | |
// Author: Tony Schneider (@tonywok) | |
// Please tell me where I fail. :) | |
// iPhone v(4,4S) portrait | |
// test: black text (overwritten by v* portrait) with blue background | |
@media all and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) { | |
a { |
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
<?php | |
/** | |
* On-the-fly CSS Compression | |
* Copyright (c) 2009 and onwards, Manas Tungare. | |
* Creative Commons Attribution, Share-Alike. | |
* | |
* In order to minimize the number and size of HTTP requests for CSS content, | |
* this script combines multiple CSS files into a single file and compresses | |
* it on-the-fly. | |
* |
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 win = Ti.UI.currentWindow; | |
Titanium.PageFlip = Ti.PageFlip = require('ti.pageflip'); | |
var pdf = 'http://assets.appcelerator.com.s3.amazonaws.com/docs/Appcelerator-IDC-Q1-2011-Mobile-Developer-Report.pdf'; | |
var fileName = pdf.split('/').pop(); | |
var pdfFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, fileName); | |
function downloadPDF() { | |
var progressBar = Ti.UI.createProgressBar({ max: 1, min: 0, value: 0, visible: true }); | |
win.add(progressBar); |
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
Titanium.UI.setBackgroundColor('#000'); | |
// Create a window | |
var win = Titanium.UI.createWindow({ | |
title:'Web Test', | |
backgroundColor:'#fff' | |
}); | |
// and now a webView | |
var webview1 = Titanium.UI.createWebView({url:'somePage.html'}); |
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
/* | |
Bullet Proof window drag | |
This is the most performant window dragging code | |
I could come up with. All the example on | |
developer.appcelerator.com we laggy | |
Version 2: More contained version | |
*/ |
OlderNewer