Skip to content

Instantly share code, notes, and snippets.

View DylanFM's full-sized avatar

Dylan Fogarty-MacDonald DylanFM

View GitHub Profile
(function($) {
$.fn.extend({
pluginName: function(options) {
// Initialise the class
new PluginClass(this, $.extend({}, $.fn.pluginName.defaults, options));
// Return this for chaining
return this;
}
});
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>sketch</title>
<style type="text/css" media="screen">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>sketch</title>
<style type="text/css" media="screen">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>untitled</title>
</head>
// NS is a global variable for a namespace for the app's code
var NS = {};
NS.Obj = (function() {
// Private vars and methods always available to returned object via closure
return {
method: function() {
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Testa</title>
</head>
var GAImporter = function() {
this.busy = false;
this.poller = setInterval((function(that) {
return function() {
that.pollJob();
};
})(this), 5000);
this.pollJob = function() {
ruby-1.8.6-p383 > postcode = Postcode.find_by_postcode(2251)
=> #<Postcode id: 1026, postcode: 2251, suburb: "AVOCA BEACH", state: "NSW", dc: "TERRIGAL DC", type_str: "Delivery Area", lat: #<BigDecimal:10451f1a8,'-0.33464937E2',18(27)>, lng: #<BigDecimal:10451f108,'0.151432387E3',18(27)>, created_at: nil, updated_at: nil>
ruby-1.8.6-p383 > Course.find(:all, :origin => [postcode.lat, postcode.lng], :within => 20)
=> [#<Course id: 25996, type: "Course", title: "", raw_body: nil, html_body: "", start_time: nil, end_time: nil, v4_id: 2284, created_at: "2009-01-07 23:06:26", updated_at: "2009-01-08 02:30:48", start_date: nil, end_date: nil, slug: "25996-palm-beach-golf-club", v4_slug: "2284-palm-beach-golf-club", lat: #<BigDecimal:1044faf38,'-0.33590081E2',18(27)>, lng: #<BigDecimal:1044fadf8,'0.151323109E3',18(27)>, reviews_count: 6, average_review: #<BigDecimal:1044faba0,'0.1667E1',18(18)>, featured: "", forum_id: nil, topic_id: nil, cached_tag_list: "", delta: false, workflow_state: "new">, #<Course id: 2552
# Default passenger
# LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.2.5/ext/apache2/mod_passenger.so
# PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.2.5
# PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
# Use RVM 1.8.6 ruby
LoadModule passenger_module /Users/dylanfm/.rvm/gems/ruby/1.8.6/gems/passenger-2.2.5/ext/apache2/mod_passenger.so
PassengerRoot /Users/dylanfm/.rvm/gems/ruby/1.8.6/gems/passenger-2.2.5
PassengerRuby /Users/dylanfm/.rvm/bin/ruby-1.8.6-p383