Public Gists by teddyzetterlund

Gravatar
Tue May 26 02:50:29 -0700 2009
1
2
# Type this in terminal to deactivate Top Sites in Safari 4
defaults write com.apple.Safari DebugSafari4IncludeTopSites -bool FALSE
Gravatar
Thu Apr 23 02:16:31 -0700 2009
1
2
3
# Snippet from http://mislav.uniqpath.com/rails/haxor-backdoor-in-development/
class SessionsController < ApplicationController
 
gist: 98530 Marks the current day with ...
Gravatar
Mon Apr 20 06:23:11 -0700 2009
1
2
3
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
Gravatar
Sun Mar 15 14:01:49 -0700 2009
1
2
3
#!/bin/bash
# Unattended REE/Passenger installation
# Source: http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/
Gravatar
Wed Mar 11 10:08:00 -0700 2009
1
2
3
<!doctype html>
<html lang="en">
  <head>
Gravatar
Mon Mar 09 11:57:03 -0700 2009
1
2
3
// tooltip plugin for jQuery
 
(function($) {
Gravatar
Fri Mar 06 03:10:44 -0800 2009
1
2
3
<!doctype html>
<html lang="en">
  <head>
Gravatar
Tue Mar 03 03:59:56 -0800 2009
1
2
3
# Copy style guide
 
Here is twelve simple tips to follow when adding your own copy to the site.
Gravatar
Wed Feb 11 04:15:35 -0800 2009
1
2
3
# SUPER DARING APP TEMPLATE 1.0
# By Peter Cooper
 
Gravatar
Sun Feb 01 08:11:03 -0800 2009
1
find . \( -type d -empty \) -and \( -not -regex ./\.git.* \) -exec touch {}/.gitignore \;
Gravatar
Mon Jan 19 02:39:50 -0800 2009
1
2
3
/* "Safe" ways to target different browsers with CSS */
 
* html div { display: block; } /* Internet Explorer 6 */
Gravatar
Fri Jan 09 02:40:47 -0800 2009
1
2
3
/* Make IE scale images more smoothly,
which other browsers already do by default. */
img { -ms-interpolation-mode:bicubic; }
Gravatar
Mon Oct 13 04:42:10 -0700 2008
1
2
3
# Redirect back or to a passed default url.
def redirect_back_or_default(default = root_url)
  redirect_to :back
Gravatar
Wed Sep 24 04:04:20 -0700 2008
1
ls | grep merb- | sed 's/-[0-9].[0-9].[0-9]//' | xargs sudo gem uninstall
Gravatar
Thu Sep 18 06:04:06 -0700 2008
1
2
3
Alt. #1
<div class="nav">
 
Gravatar
Thu Sep 18 02:13:29 -0700 2008
1
2
3
def content_for_admin(&block)
  yield if current_user.admin?
end
Gravatar
Thu Sep 18 02:11:13 -0700 2008
1
2
3
/*
<% flash.each do |key, msg| -%>
<%= content_tag :p, msg, :id => key -%>
Gravatar
Wed Sep 03 05:24:13 -0700 2008
1
2
3
class OperatingSystem < ActiveRecord::Base
  def to_param
    "#{id}-#{name.gsub(/[^a-z0-9]+/i, '-')}".downcase
Gravatar
Wed Sep 03 04:56:35 -0700 2008
1
2
3
def destroy
  @foo = Foo.find(params[:id])
 
Gravatar
Tue Sep 02 04:07:22 -0700 2008
1
2
3
#nav li:hover, #nav li.hover { /* all your beautiful hover styles in here */ }
 
* html #nav li {