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
ExpiresActive On | |
Options FollowSymLinks MultiViews | |
#Do these from rails explicity | |
#ExpiresByType text/html "access plus 1 minute" | |
#Do this from Apache | |
ExpiresByType text/css "access plus 1 year" |
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
require 'rubygems' | |
require 'capybara' | |
require 'capybara/dsl' | |
require 'yaml' | |
Capybara.run_server = false | |
Capybara.current_driver = :selenium |
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
curl -I http://t.co/yGSpxHj | |
HTTP/1.1 301 Moved Permanently | |
Date: Sat, 02 Jul 2011 08:19:46 GMT | |
Server: hi | |
Location: http://budurl.com/tyf4?de8a | |
Cache-Control: private,max-age=300 | |
Expires: Sat, 02 Jul 2011 08:24:46 GMT | |
Content-Type: text/html; charset=UTF-8 | |
X-Pad: avoid browser bug | |
Connection: close |
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
$baseColor1: #2C1D07; | |
$baseColor2: #2244DD; | |
// navigation | |
$navigationFG: #000; | |
$navigationBG: #FFF; | |
// currently selected |
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
function PagedChildren($klazz, $childrenPerPage = 10) { | |
$pageLength = $childrenPerPage; | |
$parentID = $this->ID; | |
if ($this->ClassName == 'NewsItemsFolder') { | |
if ($this->ItemsPerPage) { | |
$pageLength = $this->ItemsPerPage; | |
//error_log("Items per page:".$childrenPerPage); | |
} |
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
<% if LastPagedResults.MoreThanOnePage %> | |
<div class="pageNumbers"> | |
<% if LastPagedResults.NotFirstPage %> | |
<a class="prev" href="$LastPagedResults.PrevLink" title="View the previous page">Prev</a> | |
<% end_if %> | |
<span> | |
<% control LastPagedResults.Pages %> | |
<% if CurrentBool %> | |
$PageNum |
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
#Inserting Arbitrary Javascript into a DOM Popup | |
I recently ran into the problem of how to insert my own Javascript into a DOM popup window. After much googling and getting nowhere I resorted to reading the code and discovered that it was in fact quite simple to do. | |
The problem I was trying to solve was for a dropdown select box to toggle fields in the form, depending on whether a link is internal or external to the site. The relevant parts of the Link model are this: | |
static $db = array( | |
'URL' => 'Text', | |
'Title' => 'Text', | |
'Description' => 'HTMLText', |
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
curl -i twitter.com | |
HTTP/1.0 200 OK | |
Content-type: text/plain; charset=utf-8 | |
“ขออภัยในความไม่สะดวก | |
กระทรวงเทคโนโลยีสารสนเทศและการสื่อสาร ได้มีคำสั่งให้ระงับการเผยแพร่เว็บไซด์ที่ท่านต้องการเข้าชม | |
เนื่องจากมีรูปภาพ ข้อความ และ เนื้อหาบางส่วนที่ไม่เหมาะสม สอบถามรายละเอียดเพิ่มเติมได้ที่ |
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
curl -i twitter.com | |
HTTP/1.0 200 OK | |
Content-type: text/plain; charset=utf-8 | |
“ขออภัยในความไม่สะดวก | |
กระทรวงเทคโนโลยีสารสนเทศและการสื่อสาร ได้มีคำสั่งให้ระงับการเผยแพร่เว็บไซด์ที่ท่านต้องการเข้าชม | |
เนื่องจากมีรูปภาพ ข้อความ และ เนื้อหาบางส่วนที่ไม่เหมาะสม สอบถามรายละเอียดเพิ่มเติมได้ที่ |
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
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?msa=0&msid=216422549294596635064.0004acdeee0be9f2438a2&ie=UTF8&ll=13.892612,100.489429&spn=0.044645,0.040158&t=h&vpsrc=0&output=embed"></iframe><br /><small>View <a href="http://maps.google.com/maps/ms?msa=0&msid=216422549294596635064.0004acdeee0be9f2438a2&ie=UTF8&ll=13.892612,100.489429&spn=0.044645,0.040158&t=h&vpsrc=0&source=embed" style="color:#0000FF;text-align:left">Nontahburi Cycling Trip</a> in a larger map</small> |
OlderNewer