This file contains hidden or 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 src="includes.js" runat="edge"></script> | |
| <html> | |
| <script runat="edge">Mixer('header.html');</script> | |
| <body> | |
| <script runat="edge"> | |
| Mixer('nav2.html', { | |
| timeout: 200, //in ms | |
| errors : {default: 'Failed', not_found: 'Content not found', timeout: 'Content timed out'} | |
| }); |
This file contains hidden or 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
| In 2009, the offices will be closed on the following holidays: | |
| * Jan 1 New Year's Day | |
| Jan 2 Day after New Year’s Day | |
| Jan 19 MLK, Jr. Day | |
| Feb 16 President’s Day | |
| * May 25 Memorial Day | |
| * Jul 3 Day before Independence Day | |
| * Sept 7 Labor Day | |
| * Nov 26 Thanksgiving Day | |
| Nov 27 Day after Thanksgiving Day |
This file contains hidden or 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
| import re | |
| class Parser: | |
| __js_block = re.compile(r"(<script.+?runat=\"proxy\".*?>)(.*?)(</script>)") | |
| __script_start = re.compile(r"<script.+?runat=\"proxy\".*?>") | |
| __script_end = "</script>" | |
| def __init__(self, raw): | |
| self.data = Parser.__js_block.split(raw) | |
This file contains hidden or 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
| cruise@asharite:/var/lib/cruise-server/pipelines/ars-shortener/ars_shortener$ ./manage.py syncdb --settings=ars_shortener.settings_live | |
| Traceback (most recent call last): | |
| File "./manage.py", line 11, in <module> | |
| execute_manager(settings) | |
| File "/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line 340, in execute_manager | |
| utility.execute() | |
| File "/usr/lib/python2.5/site-packages/django/core/management/__init__.py", line 295, in execute | |
| self.fetch_command(subcommand).run_from_argv(self.argv) | |
| File "/usr/lib/python2.5/site-packages/django/core/management/base.py", line 192, in run_from_argv | |
| self.execute(*args, **options.__dict__) |
This file contains hidden or 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
| 11:08 -!- Irssi: Starting query in arstechnica with pax_romana | |
| 11:08 <MrKurt> help | |
| 11:08 -Pax_Romana(OperServ@asharite.arstechnica.com)- Pax_Romana allows Operators/Administrators with access, to | |
| 11:08 -Pax_Romana(OperServ@asharite.arstechnica.com)- maintain control on the network. | |
| 11:08 -Pax_Romana(OperServ@asharite.arstechnica.com)- For more information on the commands, type | |
| 11:08 -Pax_Romana(OperServ@asharite.arstechnica.com)- /msg Pax_Romana HELP <command> | |
| 11:08 -Pax_Romana(OperServ@asharite.arstechnica.com)- | |
| 11:08 -Pax_Romana(OperServ@asharite.arstechnica.com)- HELP Display this screen | |
| 11:08 -Pax_Romana(OperServ@asharite.arstechnica.com)- IDENTIFY Identify with Pax_Romana with your password | |
| 11:08 -Pax_Romana(OperServ@asharite.arstechnica.com)- * * * * |
This file contains hidden or 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
| import os | |
| def civis(): | |
| config.fab_hosts = ['arstechnica@75.102.3.18'] | |
| 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) |
This file contains hidden or 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 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'} | |
| }); |
This file contains hidden or 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
| 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'} | |
| }); |
This file contains hidden or 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
| 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): |
This file contains hidden or 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
| 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 = '' | |