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 window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |
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
meter{ | |
display: block; | |
border: 1px outset; | |
height: 20px; | |
width: 100px; | |
overflow: hidden; | |
} | |
meter div | |
{ | |
display: block; |
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
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ | |
var metas = document.getElementsByTagName('meta'); | |
var i; | |
if (navigator.userAgent.match(/iPhone/i)) { | |
for (i=0; i<metas.length; i++) { | |
if (metas[i].name == "viewport") { | |
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.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
From: http://snipt.net/yonishin/about-xcode-4-project-template | |
XCode 4 Projects and Files Template Folder: /Developer/Library/Xcode/Templates | |
Examples: | |
/Developer/Library/Xcode/Templates/Project Templates/Base/Other/Empty.xctemplate | |
/Developer/Library/Xcode/Templates/Project Templates/Base/Base.xctemplate | |
/Developer/Library/Xcode/Templates/Project Templates/Mac/Mac Base.xctemplate | |
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Command Line Tool.xctemplate | |
/Developer/Library/Xcode/Templates/Project Templates/Mac/Application/Cocoa Application.xctemplate |
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
# These are my notes from the PragProg book on CoffeeScript of things that either | |
# aren't in the main CS language reference or I didn't pick them up there. I wrote | |
# them down before I forgot, and put it here for others but mainly as a reference for | |
# myself. | |
# assign arguments in constructor to properties of the same name: | |
class Thingie | |
constructor: (@name, @url) -> | |
# is the same as: |
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
// Provides a mixin to define hyphenation | |
// | |
// Requires Compass | |
// | |
// (http://blog.fontdeck.com/post/9037028497/hyphens) | |
// (http://www.w3.org/TR/css3-text/#hyphenation) | |
// | |
// $value - The hyphenation property value. One of "none", "manual", "auto" or "all" | |
// | |
// Example .scss: |
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 | |
/** | |
* Fixes URLs to asset files. | |
* | |
* If SITE_URL is left blank then WordPress will assume that the SITE_URL is | |
* the current URL which causes problems when the current URL is not the root | |
* page. So, instead of linking to | |
* /wp-content/themes/themename/js/main.js it would link to | |
* /some-page-name/a-child-page/wp-content/themes/themename/js/main.js which | |
* breaks things. This attemps to fix this. |
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
XMPP = {}; | |
// ............................................... | |
// Models | |
// | |
XMPP.BOSHConnection = SC.Record.extend({ | |
primaryKey: 'jid', | |
jid: SC.Record.attr(String), | |
password: SC.Record.attr(String), |
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 | |
/* | |
Here's a couple of metaboxes that I've recently created using this system | |
*/ | |
$subpostings = redrokk_metabox_class::getInstance('subpostings', array( | |
'title' => '(optional) Subscription for Postings', | |
'description' => "As an optional feature, you have a complete api at your disposal which will allow you the ability to offer and manage member posts. In addition to these settings, you may need to create the associated pages for accepting posts from your frontend.", |
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 | |
/* | |
Plugin Name: Featured Custom Post Type Widget | |
Plugin URI: http://www.sennza.com.au | |
Description: Lists out all the custom post type posts in a dropdown so the user can selected a CPT to feature. | |
Version: 1.0 | |
Author: Bronson Quick | |
Author URI: http://www.sennza.com.au | |
License: GPL2 |
OlderNewer