Skip to content

Instantly share code, notes, and snippets.

View jordandobson's full-sized avatar
🥽

Jordan Dobson jordandobson

🥽
View GitHub Profile
# Three things to add:
# * before_filter call
# * action_has_layout? method (if you have one, combine them)
# * adjust_for_inline
#
class ApplicationController < ActionController::Base
# ...
before_filter :adjust_for_inline

HOWTO: iPhone AT&T Tethering

In 10 steps:

  • Update iTunes to 8.2 via Software Update
  • Update your iPhone to the 3.0 release (out today - June 17th)
  • Download this dmg and mount it: tethering file
  • Enable hidden carrier testing option (in Terminal.app): defaults write com.apple.iTunes carrier-testing -bool TRUE
  • Start up iTunes
@jordandobson
jordandobson / Help_Chat_bubble_with_css_and_unicode.html
Created August 12, 2009 20:28
A Help / Chat bubble using only CSS + Unicode. No Images needed!
<html>
<head>
<title>Help / Chat Bubble with CSS + Unicode</title>
<!--
Created by: Jordan Robert Dobson
JordanDobson@Gmail.com
http://MadeBySquad.com
http://twitter.com/JordanDobson
@jordandobson
jordandobson / form_help_bubble.html
Created August 12, 2009 20:43
An example of using a CSS+Unicode help bubble with an input field.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Help Bubble with CSS + Unicode + Input field</title>
<!--
Created by: Jordan Robert Dobson
JordanDobson@Gmail.com
require 'open-uri'
module SchoolReport
NO_ALERT = "0"
ALERT = /.+\w+\s+(\d)\s+\d+/
URL = 'http://media.schoolreport.org/media/export.php?userId=422'
def self.has_alert?
open(URL) do |report|
a#cartButton{
overflow: visible;
}
a#cartButton small.indicator{
font-size: 1em;
position: absolute;
display: block;
overflow: hidden;
top: -.5em;
right: 100%;
@jordandobson
jordandobson / SegmentedMenu.css
Created January 11, 2010 00:53
Segmented Controls Styles for JQTouch using UL > LI > A
/* @group Segmented */
ul.segmented {
border: 0px;
padding-bottom: 1px;
background: none;
overflow: hidden;
list-style: none;
text-align: center;
font-size: 1px;
var trkTimeTotal = 50000; // 50 seconds in milliseconds
var trkTimeStart = 10000; // 10 seconds in milliseconds
$(document).ready(function(){
$("#jquery_jplayer").jPlayer({
ready: function () {
$(this).setFile("mp3/10SecondsIn.mp3").play();
},
volume: 100,
oggSupport: false
<script type="text/javascript">
var appVer = navigator.appVersion;
var searchVersion = /\s(\d)_\d/;
var searchDevice = /\s[(](\w+\s?\w*)[;]\s/;
var isIPhone = false;
var isIPad = false;
if (searchVersion.exec(appVer) && searchDevice.exec(appVer)){
var deviceVersion = searchVersion.exec(appVer)[1];
if ("iPhone" == searchDevice.exec(appVer)[1]){ isIPhone = deviceVersion; }
if ("iPhone Simulator" == searchDevice.exec(appVer)[1]){ isIPhone = deviceVersion; }
@jordandobson
jordandobson / test_taskmaster.rb
Created April 15, 2010 19:05
Example of Setup for storing puts and clearing for testing
class TestTaskmaster < Test::Unit::TestCase
def setup
###
# Setup Class
@tm = Taskmaster
###