Skip to content

Instantly share code, notes, and snippets.

<html>
<head></head>
<body>
<script type="text/javascript">tpcsb_question_id = 170;</script>
<script type="text/javascript" src="http://assets.conversations.typepad.com/clients/conversations-units-base/sponsor-bars/sponsor-bar.js"></script>
</body>
</html>
@nataliepo
nataliepo / snippet.pl
Created December 17, 2010 16:00
This method is called on every pageview.
sub disqus_sso {
use Digest::HMAC_SHA1 qw(hmac_sha1_hex);
use JSON qw(to_json);
my $app = shift;
my $q = $app->param;
my $plugin = MT->component('DisqusCommentSystem');
my $scope = 'blog:' . $q->param('blog_id');
my $config = $plugin->get_config_hash($scope);
my $partner_key = $config->{disqus_partner_key};
@nataliepo
nataliepo / Entry.pm
Created December 28, 2010 01:41
comment_count updates happening in core
MT::Comment->add_callback( 'post_save', 0, MT->component('core'),
sub {
my ($cb, $comment) = @_;
my $entry = MT::Entry->load( $comment->entry_id )
or return;
$entry->clear_cache('comment_latest');
my $count = MT::Comment->count(
{
entry_id => $comment->entry_id,
visible => 1,
@nataliepo
nataliepo / recipes_index.html
Created January 6, 2011 17:05
diff for merged recipes file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<mt:include module="Global Vars">
<html>
<head>
<title>Serious Eats: <$MTBlogName encode_html="1"$></title>
<meta name="description" content="Serious Eats is focused on sharing food enthusiasm through online conversation, blogs, and video. Our combination of community and content brings together compelling original and acquired food video and spirited, inclusive discussion about all things food-related." />
<!--#include virtual="/includes/headTags.txt" -->
<script src="/js/mobileRedirect.js" type="text/javascript"></script>
<link rel="alternate" type="application/atom+xml" title="Serious Eats: Recipes" href="http://feeds.feedburner.com/seriouseats/recipes" />
<script type="text/javascript">
@nataliepo
nataliepo / recipe_ind_entry_archive.html
Created January 6, 2011 17:17
Recipes - Ind Entry Archive diff
<!DOCTYPE html>
<mt:include module="Global Vars">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><$MTEntryTitle remove_html="1"$> | Serious Eats : Recipes</title>
<meta name="description" content="<MTEntryBody words="40" convert_breaks="0" encode_html="1">..." />
<MTEntryIfTagged><meta name="keywords" content="Serious Eats, food, media, recipes, news, <MTEntryTags glue=", "><$MTTagName$></MTEntryTags>" /></MTEntryIfTagged>
<!--#include virtual="/includes/headTags.txt" -->
<link rel="stylesheet" type="text/css" href="/css/recipeHeaders.css?v=060508" />
@nataliepo
nataliepo / css_global_masthead.css
Created January 6, 2011 17:37
SE Main - Global Masthead diff
.clearfix:after{clear:both;content:'.';display:block;visibility:hidden;height:0}
.clearfix{display:inline-block}
* html .clearfix{height:1%}
.clearfix{display:block}
body { background: #DAE491 url(http://www.seriouseats.com/imagesV3/bg2.png) repeat-x; }
#logo { display:inline;height:122px;margin-left:25px;margin-right:18px;margin-top:10px;width:182px; }
#topHeader { background:none;padding-top:0; }
#SL li a, #AHT li a { padding:0; }
@nataliepo
nataliepo / css_new_general_jan10.css
Created January 6, 2011 17:46
SE - Main - New General Jan 10 diff
.clearfix:after{clear:both;content:'.';display:block;visibility:hidden;height:0}
.clearfix{display:inline-block}
* html .clearfix{height:1%}
.clearfix{display:block}
.hmenu { list-style:none;margin-left:0;padding:0; }
.hmenu li { border-left:1px solid #ccc;display:inline;line-height:1;list-style:none;padding:0 3px 0 6px; }
.hmenu li.first { border-left:0;padding-left:0; }
.fmenu { float:left;margin:0;width:auto; }
.fmenu li { float:left;list-style:none;width:auto; }
.fmenu li a { display:block;float:left;width:auto; }
@nataliepo
nataliepo / cat-archive.html
Created January 7, 2011 19:49
the full archive template for blog_id=30
<mt:setvarblock name="this_blog_id"><mt:blogid></mt:setvarblock><!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>
<title>Serious Eats: <MTIfCategory label="-For-Eating-Out-Index">Eating Out<MTElse><$MTCategoryLabel$></MTElse></MTIfCategory></title>
<!--#include virtual="/includes/headTags.txt" -->
<script type="text/javascript">
federated_media_section = "<MTIfCategory label="Hidden Gems">Basil_Haydens</MTIfCategory>";</script>
<MTignore><script type="text/javascript">
@nataliepo
nataliepo / clear_inputform_text.js
Created January 25, 2011 16:05
do that thing that tracie needs all the time
<!-- that hting -->
<script type="text/javascript">
alert("HEYO");
</script>
# handle vhosts here
if (req.http.host ~ "^(www.)?staging-seriouseats.com$") {
set req.http.host = "www.staging-seriouseats.com";
set req.backend = staging;
}
else if (req.http.host ~ "^newyork.staging-seriouseats.com$") {
set req.backend = staging;
}
else {
set req.backend = apache;