This file contains 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
// Add classes to <html> for responsive layouts - | |
// e.g. <html class="over320 over480 under768 under960"> | |
jQuery(function() { | |
var widths = [ 320, 480, 768, 960 ]; | |
var setWidthClasses = function() { | |
var w = $(window).width(); | |
for(var i=0; i<widths.length; i++) { | |
$('html').removeClass('under' + widths[i]).removeClass('over' + widths[i]); | |
} |
This file contains 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
class PostsController < ApplicationController | |
inherit_resources | |
protected | |
def begin_of_association_chain | |
Agency.find_by_code request.subdomains.first | |
end | |
end |
This file contains 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
# Pow | |
alias startpow='curl get.pow.cx | sh' | |
alias stoppow='curl get.pow.cx/uninstall.sh | sh' |
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Page Not Found</title> | |
<style type="text/css" media="screen"> | |
body { | |
background: #f0f0f0; | |
font: normal 18px sans-serif; | |
width: 400px; |
This file contains 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/bash | |
cd "/Users/_YOU_/Library/Application Support/Notational Data/" | |
# Make sure you've already set up the git repo | |
git add . | |
git commit -a -m "Simplenote Sync" | |
# Get SimplenoteSync here: http://fletcherpenney.net/other_projects/simplenotesync/ |
This file contains 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
%body{:class => "#{controller_name} #{action_name}"} |
This file contains 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
<body class="<%= controller_name -%> <%= action_name -%>"> |
This file contains 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
#!/usr/local/bin/ruby | |
require 'fileutils' | |
unless ARGV.size > 1 | |
puts "Usage: #{__FILE__} [email protected] email [ email ] ..." | |
exit | |
end | |
QMAIL_DIR = "/var/qmail/mailnames" | |
alias_address = ARGV.shift | |
domain = alias_address.match(/[^@]+$/).to_s |
This file contains 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
#!/usr/bin/env ruby | |
# This should fix your NS records if you used the old version of slicedns.rb. | |
# Check to see if any of your zones list ns1/2/3.slicehost.com as a nameserver. | |
# It will change ALL NS records that have ns*.slicehost.com to ns*.slicehost.net | |
require 'rubygems' | |
require 'activeresource' | |
API_PASSWORD = 'your_api_key' |