Skip to content

Instantly share code, notes, and snippets.

<mt:Order>
<mt:Entries lastn="10">
<mt:OrderItem>
<mt:SetVarBlock name="order_by"><mt:EntryDate utc="1" format="%Y%m%d%H%M%S"></mt:SetVarBlock>
<mt:Include module="Entry">
<mt:SetVarBlock name="last_entry_yday"><mt:EntryDate format="%j"></mt:SetVarBlock>
<mt:SetVarBlock name="last_entry_year"><mt:EntryDate format="%Y"></mt:SetVarBlock>
[pid 9110] writev(16, [{"", 0}, {"[\"reset\"]\n", 10}], 2) = 10
[pid 9110] clock_gettime(CLOCK_MONOTONIC, {5266019, 29140440}) = 0
[pid 9110] clock_gettime(CLOCK_MONOTONIC, {5266019, 29202440}) = 0
[pid 9110] epoll_wait(3, <unfinished ...>
[pid 9168] <... write resumed> ) = 5
[pid 9168] read(0, "[\"reset\"]\n", 4096) = 10
[pid 9168] write(1, "true\n", 5 <unfinished ...>
[pid 9110] <... epoll_wait resumed> {{EPOLLIN, {u32=13, u64=21474836493}}}, 256, 5000) = 1
[pid 9110] clock_gettime(CLOCK_MONOTONIC, {5266019, 29876440}) = 0
[pid 9110] read(13, "true\n", 65536) = 5
Index: t/11-sql.t
===================================================================
--- t/11-sql.t (.../tags/release-0.05) (revision 528)
+++ t/11-sql.t (.../trunk) (revision 528)
@@ -3,7 +3,7 @@
use strict;
use Data::ObjectDriver::SQL;
-use Test::More tests => 58;
+use Test::More tests => 67;
// ==UserScript==
// @name No Loudtwitter
// @namespace http://markpasc.org/code/gm/
// @description Removes Loudtwitter posts from friends pages
// @include http://markpasc.livejournal.com/friends*
// @include http://mark.vox.com/explore/neighborhood*
// ==/UserScript==
(function() {
function purge(expr) {
#!/usr/bin/perl -w
package CountEntries;
use strict;
use lib qw( extlib lib );
use base qw( MT::Tool );
sub help { q{} }
sub usage { q{} }
@markpasc
markpasc / vcs
Created September 30, 2009 17:28
which vcs am i using again?
#!/bin/sh
# which vcs am i using again?
if [ -e .svn ]
then
echo "svn"
fi
git rev-parse --is-inside-work-tree > /dev/null 2> /dev/null
if [ 0 -eq $? ]
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> cdnize = re.compile(r'http://www.example.com/(images.*)')
>>> text = ("""<p><a href="http://www.example.com/images/full_size_image.jpg">"""
... """<img src="http://www.example.com/images/assets_c/thumbnail.jpg">"""
... """</a></p>""")
>>> print text
<p><a href="http://www.example.com/images/full_size_image.jpg"><img src="http://www.example.com/images/assets_c/thumbnail.jpg"></a></p>
#!/usr/bin/env python
"""Searches for your friends on Hype Machine (hypem.com) by seeing if there are
Hype Machine users who have the same usernames as people you follow on TypePad
or Twitter."""
import logging
import sys
from time import sleep
@import url(http://lab.arc90.com/experiments/readability/css/readability.css);
/* Make long lines in <pre> tags wrap anyway. */
pre {
white-space: pre-wrap;
}
#!/usr/bin/perl
# Show battery status from LaunchBar.
# Drop this in your App Support/LaunchBar/Actions dir, chmod it +x, and have
# LaunchBar reindex to find it.
package Battery;
use Encode;
use charnames ':full';