Skip to content

Instantly share code, notes, and snippets.

View jrutter's full-sized avatar

Jake Rutter jrutter

View GitHub Profile
@thefuxia
thefuxia / t5-comment-textarea-on-top.php
Last active October 4, 2015 01:27
Makes the textarea the first field of the comment form.
<?php # -*- coding: utf-8 -*-
/**
* Plugin Name: T5 Comment Textarea On Top
* Plugin URI: http://toscho.de/?p=2239
* Description: Makes the textarea the first field of the comment form.
* Version: 2012.09.04
* Author: Thomas Scholz <info@toscho.de>
* Author URI: http://toscho.de
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
@dawsontoth
dawsontoth / Geolocation.js
Created February 9, 2011 23:35
Constantly Updating Geolocation in Appcelerator Titanium
Titanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;
Titanium.Geolocation.distanceFilter = 0;
var win = Ti.UI.createWindow({backgroundColor: '#fff'});
var label = Ti.UI.createLabel();
win.add(label);
win.open();
function reportPosition(e) {
if (!e.success || e.error) {
@eric1234
eric1234 / image-defer.js
Last active July 10, 2017 15:17
Deferred image loading
var ImageDefer = Class.create({
initialize: function(placeholder) {
this.placeholder = $(placeholder);
this.placeholder.update('Loading image...');
if(ImageDefer.page_loaded) {
this.preload();
} else {
Event.observe(window, 'load', (function() {this.preload()}).bind(this));
}