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
<script type="text/javascript" charset="utf-8"> | |
if(navigator.geolocation && navigator.vendor.indexOf('Apple') !== -1) { | |
// Safari 5 added geolocation, so any Apple browser including it | |
// would have Reader. Yeah I know this also catches MobSaf too. | |
var meanies = document.createElement('p'); | |
meanies.style['position'] = 'absolute'; | |
meanies.style['left'] = '-10000px'; | |
meanies.innerHTML = 'I can make you see things in Safari Reader :) <img src="http://clintecker.com/thumbsup.jpg" /> <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/GEXn_8FG75Q&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/GEXn_8FG75Q&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>'; | |
var article = document.getElementById('article'); | |
article.inser |
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
ars.interior.update_hidden_comment = function(e){ | |
var hidden = $('#hiddencomment'), | |
comment = $('#comment-form-textarea'); | |
hidden.text(comment.val()); | |
if(hidden.height() > 224){ | |
comment.css('height', hidden.height() + 'px'); | |
} else { | |
comment.css('height', '224px'); | |
} | |
}; |
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
proc stock symbol { | |
set html [unescape_html_entities [wget http://www.google.com/finance?q=$symbol]]; | |
set cn [html [strip_html [lindex [regexp -all -inline {<h1>(.*?)</h1>} $html] 1]]]; | |
set curr [html [strip_html [lindex [regexp -all -inline {<span class="pr".*?>(.*?)<} $html] 1]]]; | |
set chr [regexp -all -inline {<span class="ch[rg]".*?>(.*?)<} $html]; | |
if {[lindex $chr 1] < 0} {set col red} else {set col green}; | |
. "[bold]$curr[bold]: [color $col on white][html [strip_html [lindex $chr 1]]] [html [strip_html [lindex $chr 3]]][color] [color blue on white]$cn[color]"} |
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
SELECT author_id, author_email, author_meta_type, author_meta_vchar_idx, author_modified_on FROM mt_author LEFT OUTER JOIN mt_author_meta ON (author_id = author_meta_author_id AND author_meta_type='field.ars_opt_in') | |
UNION ALL | |
SELECT author_id, author_email, author_meta_type, author_meta_vchar_idx, author_modified_on FROM mt_author LEFT OUTER JOIN mt_author_meta ON (author_id = author_meta_author_id AND author_meta_type='field.partner_opt_in') ORDER by author_id Limit 0,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
SELECT COUNT(*) FROM ( | |
SELECT author_id, author_email, author_meta_type, author_meta_vchar_idx, author_modified_on | |
FROM mt_author as t1 | |
LEFT OUTER JOIN mt_author_meta as t2 | |
ON (t1.author_id = t2.author_meta_author_id AND t2.author_meta_type='field.ars_opt_in') | |
UNION ALL | |
SELECT author_id, author_email, author_meta_type, author_meta_vchar_idx, author_modified_on | |
FROM mt_author as t1 | |
LEFT OUTER JOIN mt_author_meta as t2 |
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
proc y_stock_info args { | |
set symbols [join $args] | |
set symbols [string toupper $symbols] | |
set html [120~http://finance.yahoo.com/q/cq?d=v1&s=[join [concat $symbols {.IXIC .DJI}]]] | |
set table [last [regexp -inline {<table.*?class="yfi_columnar_data">\s*(.+?)\s*</table>} $html]] | |
set rows [lrange [evens [regexp -all -inline {(.*?)(?:</tr>)} $table]] 1 end] | |
set info [list] | |
foreach row $rows { | |
foreach {name pattern} { |
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" xml:lang="en-US"> | |
<head> | |
<!-- Meta Data --> | |
<title>Ars Technica</title> | |
<meta http-equiv="Content-Type" content="text/html; 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
d |
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" xml:lang="en-US"> | |
<head> | |
<!-- Meta Data --> | |
<title>Ars Technica</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<link rel="canonical" href="http://arstechnica.com" /> |
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
[master][~/src/ars-technica-mt-bits] ./tools/run-periodic-tasks -v -d --sleep 1 | |
TheSchwartz::work_once got job of class 'MT::Worker::Publish', priority 10 | |
Working on MT::Worker::Publish ... | |
Publishing /Users/clintecker/src/ars-technica-mt-bits/published/telecom/news/2009/04/congress-wants-new-probe-for-p2p-file-sharing-snafus.ars, priority 10 | |
Deep recursion on subroutine "MT::Builder::build" at lib/MT/Template/ContextHandlers.pm line 4606. | |
Deep recursion on subroutine "MT::Template::Context::_hdlr_get_var" at lib/MT/Builder.pm line 396. | |
Deep recursion on subroutine "MT::Template::Context::var" at lib/MT/Template/ContextHandlers.pm line 3446. | |
Deep recursion on anonymous subroutine at lib/MT/Template/Context.pm line 171. | |
perl(54528) malloc: *** mmap(size=16777216) failed (error code=12) | |
*** error: can't allocate region |