Skip to content

Instantly share code, notes, and snippets.

var query = document.location.search;
if (query) {
query = query.substr(1);
} else {
ls$Error.log("1x000", "Collect query parameters", "No query parameters found");
throw "No query parameters found";
}
var params = query.split("&");
var len = params === null ? 0 : params.length;
if (len < 1) {
<!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>Classically trained: Ars reviews Punch-Out for the Wii - Ars Technica</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Hackintosh:one-counter kurt$ heroku console
Ruby console for deep-journey-73.heroku.com
>> Tweets.all.inspect
NameError: uninitialized constant Tweets
>> Tweet.all.inspect
=> "[#<Tweet id: 1, text: \"2 Lovely strawberry yogurt!\", twitter_id: 108963797, user_id: 1, created_at: \"2009-04-29 22:24:52\", updated_at: \"2009-04-29 22:47:05\">, #<Tweet id: 2, text: \"5 Life cereal w/milk\", twitter_id: 108797190, user_id: 1, created_at: \"2009-04-29 19:16:12\", updated_at: \"2009-04-29 22:47:05\">, #<Tweet id: 3, text: \"5 oatmeal, butter, brown sugar\", twitter_id: 109676468, user_id: 1, created_at: \"2009-04-30 13:42:00\", updated_at: \"2009-04-30 14:14:05\">, #<Tweet id: 4, text: \"4 wheat thins\", twitter_id: 109028961, user_id: 1, created_at: \"2009-04-29 23:27:05\", updated_at: \"2009-04-30 14:14:05\">, #<Tweet id: 5, text: \"8 beef rice dinner thing\", twitter_id: 109028197, user_id: 1, created_at: \"2009-04-29 23:26:18\", updated_at: \"2009-04-30 14:14:05\">, #<Tweet id: 6, text: \"4 Wheat thins\", twitter_
require MT::Association;
require MT::Role;
my @roles = MT::Role->load({}, { join => MT::Association->join_on('role_id', { author_id => $user->id }) });
my $security_groups = join(',', keys( %{{ map { uri_escape($_->name) => 0 } @roles }} ));
def assemble_result(self, raw = None):
if not self.__extractor and not raw:
raise Error, "No source to work with"
elif raw:
self.__extractor = Extractor(raw)
result = self.run_js()
data = self.__extractor.data
output = ''
class TestRunner(unittest.TestCase):
def test_simple_js(self):
result = Runner().run_js('"kurt rocks";')
self.assertEqual(result, 'kurt rocks')
def test_longer_js(self):
result = Runner().run_js('var blah = "kurt rocks";\nblah;')
self.assertEqual(result, 'kurt rocks')
def test_complex_return(self):
Mixer.append_raw_from_array(0);
// Including: includes.js
Mixer.append_raw_from_array(4);
Mixer('header.html');
Mixer.append_raw_from_array(8);
Mixer('nav.html', {
timeout: 200, //in ms
errors : {generic: 'Failed', not_found: 'Content not found', timeout: 'Content timed out'}
});
<script src="includes.js" runat="proxy"></script>
<html>
<script runat="proxy">Mixer('header.html');</script>
<body>
<script runat="proxy">
Mixer('nav.html', {
timeout: 200, //in ms
errors : {generic: 'Failed', not_found: 'Content not found', timeout: 'Content timed out'}
});
import os
def civis():
config.fab_hosts = ['[email protected]']
config.path = '/var/web-apps/civis.ars/'
config.package_name = "civis.tar.gz"
def copy_files():
if config.package_name == "civis.tar.gz":
put("output/$(package_name)", "$(path)tmp/$(package_name)", fail=abort)
11:08 -!- Irssi: Starting query in arstechnica with pax_romana
11:08 <MrKurt> help
11:08 -Pax_Romana([email protected])- Pax_Romana allows Operators/Administrators with access, to
11:08 -Pax_Romana([email protected])- maintain control on the network.
11:08 -Pax_Romana([email protected])- For more information on the commands, type
11:08 -Pax_Romana([email protected])- /msg Pax_Romana HELP <command>
11:08 -Pax_Romana([email protected])-
11:08 -Pax_Romana([email protected])- HELP Display this screen
11:08 -Pax_Romana([email protected])- IDENTIFY Identify with Pax_Romana with your password
11:08 -Pax_Romana([email protected])- * * * *