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
header.main .hook, .container, footer.main | |
{ | |
width: 87em; | |
margin: 0 auto; | |
} | |
/* Fluid | |
header.main .hook, .container, footer.main | |
{ | |
width: auto; |
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
# iWeb at root of domain on MediaTemple (gs) | |
DirectoryIndex Welcome.html | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !/MySite/ | |
RewriteRule ^(.*?)$ /MySite/$1 [L] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>HTML5</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=650, user-scalable=yes"> | |
<!-- pick your poison: | |
<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> | |
--> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>HTML5 Boilerplate</title> | |
<meta charset="utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js"></script> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<link rel="stylesheet" href="screen.css" /> |
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
# ruby font_sizes_from_base.rb 13 | |
(10..50).each { |i| puts "#{i}px => #{(i/ARGV[0].to_f * 100).round}%" } |
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
// To get delimited values as an array | |
if (!string.IsNullOrEmpty(input)) | |
items = input.Split(new[] { ",", " ", ";" }, StringSplitOptions.RemoveEmptyEntries); | |
// To put them back together with a standard delimiter | |
var output = string.Join(", ", items); |
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
require 'rubygems' | |
require 'fastercsv' | |
def normalize(row) | |
row[2].sub!(/^0+/, "") | |
row[3].sub!(/^0+/, "") | |
return row | |
end | |
old_rows = FasterCSV.read "old.csv" |
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
SELECT HOUR(CONVERT_TZ(created_at, '+00:00','-07:00')) AS hour, COUNT(DISTINCT uuid) as count FROM hits WHERE DATE(created_at) = DATE(NOW()) GROUP BY HOUR(created_at); |
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
require 'erubis' | |
class Verb | |
def call(env) | |
base_path = File.join(Dir.pwd, env["REQUEST_URI"].sub(/\/$/, "")) | |
exact_path = base_path + ".rhtml" | |
index_path = File.join(base_path, "index.rhtml") | |
if File.exists?(exact_path) | |
render(exact_path, env) |
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
protected override void DataPortal_Update() | |
{ | |
RaiseListChangedEvents = false; | |
using (SqlConnection cn = new SqlConnection(Database.LocalConnection)) | |
{ | |
cn.Open(); | |
// loop through each deleted child object | |
// foreach (Sales deletedChild in DeletedList) | |
// // deletedChild.DeleteSelf(cn); | |
// DeletedList.Clear(); |
OlderNewer