This file contains hidden or 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 bi-directional infinite scrolling jQuery plugin | |
| // | |
| // Usage Example: | |
| // $(window).infiniteScroll({ url: window.location.href }) | |
| (function($) { | |
| $.scroller = { | |
| // default settings | |
| settings: { | |
| url: null, |
This file contains hidden or 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
| (function($) { | |
| $.scroller = { | |
| // default settings | |
| settings: { | |
| url: null, | |
| reversed: true, | |
| triggerAt: 250, | |
| page: 2, | |
| container: $(document), | |
| update: '#scroller' |
This file contains hidden or 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
| // Why is this not working in IE!?!? | |
| // (using jQuery 1.4.2 and Rails 2.3.5) | |
| // The issue is that it either: 1) posts as a regular form, ignoring the ajax | |
| // or 2) asks me to download a file | |
| // Yes, I've tried config.action_controller.use_accept_header = false | |
| // in environment.rb and that has no effect on the outcome | |
| // force accept headers |
This file contains hidden or 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
| module RPH | |
| module LinkConverter | |
| def self.included(klass) | |
| klass.extend ClassMethods | |
| end | |
| module ClassMethods | |
| def convert_links_for(*columns) | |
| methods = [] |
This file contains hidden or 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
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: mongodb | |
| # Required-Start: $all | |
| # Required-Stop: $all | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the mongodb data-store | |
| # Description: starts mongodb using start-stop-daemon |
This file contains hidden or 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 default text in a textbox that disappears when focused | |
| // Note: also toggles an 'active' CSS class so you can change text color | |
| (function($) { | |
| $.fn.friendlyTextBox = function(msg) { | |
| var regex = new RegExp('^' + msg + '$') | |
| $(this).focus(function() { | |
| if ($(this).val().match(regex)) $(this).val('') | |
| $(this).addClass('active') |
This file contains hidden or 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
| // global to store a reference | |
| // to the timed autoplay slideshow | |
| var autoplay = null | |
| // Slideshow object | |
| var Slideshow = { | |
| inited: false, | |
| // default settings when | |
| // calling Slideshow.play() |
This file contains hidden or 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
| // An unobtrusive Textile editor in jQuery | |
| // Inspired by: http://slateinfo.blogs.wvu.edu/plugins/textile_editor_helper | |
| // | |
| // Usage: | |
| // $(function() { | |
| // $('textarea.textile').textilize(); | |
| // )(jQuery); | |
| // | |
| (function($) { | |
| $.textileEditor = function(textarea, options) { |
This file contains hidden or 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
| // tooltip plugin for jQuery | |
| (function($) { | |
| $.fn.tooltip = function(options) { | |
| var options = $.extend({ | |
| xOffset: 30, | |
| yOffset: 7, | |
| follow: false | |
| }, options) | |