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 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"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Cross Browser CSS Page Curl Shadow</title> | |
<style type="text/css"> | |
body{font-family: "American Typewriter","Bookman Old Style","Palatino Linotype","Palatino",Georgia,typewriter,monos;} | |
#page-wrap{width:960px;margin:5% auto;} | |
.shadow-wrap{} |
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
<?php | |
// -------------------- RETURN USER FRIENDLY DATE/TIME STRING ------------- | |
function cuteDate($compared) { | |
if(!is_numeric($compared) || strlen(time())!=10) return 'date unknown'; // proper format check | |
$today= time(); // get it | |
$diff= $today-$compared; // subtract it | |
// return the cute string | |
switch(true) { |
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
# Reset blocks to remove standard placements. | |
UPDATE block SET status = 0, region = -1 WHERE theme = 'OLD-THEME'; | |
# Pull data across. | |
UPDATE block AS export_blocks | |
INNER JOIN block AS import_blocks | |
ON import_blocks.module = export_blocks.module | |
AND import_blocks.delta = export_blocks.delta |
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
/** | |
* Turn decimals into fractions. | |
*/ | |
function dec2frac($f) { | |
$base = floor($f); | |
if ($base) { | |
$out = $base . ' '; | |
$f = $f - $base; | |
} | |
if ($f != 0) { |
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
Query... | |
SELECT TABLE_NAME as name, TABLE_ROWS as rows, round(((data_length + index_length) / 1024 / 1024), 2) as size | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE table_schema = 'tableau_pantheon_www' | |
AND TABLE_NAME LIKE "%revision%" | |
ORDER BY size desc; | |
LOCAL TEST: | |
mysql --user=root --password=root -e "SELECT UNIX_TIMESTAMP() AS timestamp, round(((data_length + index_length) / 1024 / 1024), 2) as table_size_mb, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'tableau_pantheon_www' AND table_name = '***TABLE_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
LOCAL... | |
mysql -uroot -proot tableau_pantheon_www -e "select cid, LENGTH(data) as length_data, serialized, expire, created INTO OUTFILE '/Users/***USER***/Documents/Tableau/form_cache_size-local.csv' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' from cache_form" | |
LOCAL WITH OUT OUTFILE... | |
mysql -uroot -proot tableau_pantheon_www -e "select cid, LENGTH(data) as length_data, serialized, expire, created from cache_form" > /Users/jlind/Documents/Tableau/form_cache_size-local.txt | |
REMOTE... | |
mysql -upantheon -p***PASS*** -h dbserver.live.***HASH***.drush.in -P ***PORT*** pantheon -e "select cid, LENGTH(data) as length_data, serialized, expire, created from cache_form" > /Users/***USER***/Documents/Tableau/form_cache_size-live.txt |
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
Main things to keep in mind, since they're hard to believe... | |
1. Only use inline style. | |
2. Just give in and nest tables. It's terrible, but reliable everywhere. | |
3. Margin and padding is not completely supported (depending on DOM element). | |
Mostly just not Outlook > 2003, which is insane. | |
4. Apply style to divs and not many other tags. |
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 bash | |
GOLDEN_DOMAIN="example.com" | |
PROBLEM="$(cat /etc/hosts | grep $GOLDEN_DOMAIN | grep -v '^#' | wc -w)" | |
if [ "$PROBLEM" -gt 0 ]; then | |
say omg fix yer hosts | |
fi |
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
<?php | |
/** | |
* Utility function to agnosticly get the current menu object. | |
* Structured like menu_get_object(), but the passed type will be set for you. | |
* | |
* @param string (reference) $return_type | |
* | |
* return object | |
* Entity object of current menu callback page. | |
*/ |
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
Collection = function (obj) { | |
// Private vars. | |
var keyList = null, | |
length = null; | |
// Public functions. | |
return { | |
/** |
OlderNewer