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
| my @cats = @{$entry->categories}; | |
| my @aggs = grep { | |
| my $type = get_meta($_)->{aggregate_category}; | |
| $type && $type == "Children"; | |
| } @cats; | |
| my %meta = map {$_->id => get_meta($_)} @cats; | |
| my %idx = map {$_->id => $_} @cats; | |
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 type="text/javascript"> | |
| var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | |
| document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |
| </script> | |
| <script type="text/javascript"> | |
| try { | |
| var pageTracker = _gat._getTracker("UA-31997-3"); | |
| pageTracker._trackPageview(); | |
| } catch(err) {}</script> |
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
| target = """insert into mt_entry (mt_author_id, mt_authored_on, entry_basename, entry_blog_id, mt_class, | |
| entry_convert_breaks, entry_created_by, entry_created_on, entry_excerpt, entry_status, | |
| entry_text, entry_text_more, entry_title, entry_week_number, mubble_id) | |
| values(1, 1, '%(publish_date)', '%(filename)', 1, 'entry', | |
| 0, 0, '%(publish_date)', '%(excerpt)', %(status), | |
| '%(text)', '%(text_more)', '%(title)', '%(weeknumber)', '%(mubble_id)') | |
| on duplicate key update | |
| mt_author_id=values(mt_author_id), | |
| mt_authored_on = values(mt_authored_on), | |
| entry_basename = values(entry_basename), |
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 hashlib | |
| from base64 import b64decode, b64encode | |
| def utf16tobin(s): | |
| return s.encode('hex')[4:].decode('hex') | |
| b64salt = "kDP0Py2QwEdJYtUX9cJABg==" | |
| b64hash = "OJF6H4KdxFLgLu+oTDNFodCEfMA=" | |
| binsalt = b64decode(b64salt) | |
| password_string = 'password'.encode("utf16") |
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
| internal string EncodePassword(string pass, int passwordFormat, string salt) | |
| { | |
| if (passwordFormat == 0) | |
| { | |
| return pass; | |
| } | |
| byte[] bytes = Encoding.Unicode.GetBytes(pass); | |
| byte[] src = Convert.FromBase64String(salt); | |
| byte[] dst = new byte[src.Length + bytes.Length]; | |
| byte[] inArray = null; |
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
| from setuptools import setup | |
| setup(name='twittersmash', | |
| version='0.1', | |
| description='Ars Technica\'s twitter publishing application', | |
| author='Clint Ecker, Kurt Mackey', | |
| author_email='[email protected]', | |
| url='https://github.com/ArsTechnica/twittersmash/tree/master', | |
| packages=['twittersmash',], | |
| entry_points={'django.apps': 'twittersmash = twittersmash'}, |
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
| [Wed Oct 22 14:53:51 2008] [error] [client 72.213.170.139] mod_wsgi (pid=342): Exception occurred processing WSGI script '/home/teamcity/staging/ars-djang o-project/apache/staging.wsgi'. | |
| [Wed Oct 22 14:53:51 2008] [error] [client 72.213.170.139] Traceback (most recent call last): | |
| [Wed Oct 22 14:53:51 2008] [error] [client 72.213.170.139] File "/usr/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 239, in __call__ | |
| [Wed Oct 22 14:53:51 2008] [error] [client 72.213.170.139] response = self.get_response(request) | |
| [Wed Oct 22 14:53:51 2008] [error] [client 72.213.170.139] File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py", line 128, in get_respon se | |
| [Wed Oct 22 14:53:51 2008] [error] [client 72.213.170.139] return self.handle_uncaught_exception(request, resolver, exc_info) | |
| [Wed Oct 22 14:53:51 2008] [error] [client 72.213.170.139] File "/usr/lib/python2.5/site-packages |
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
| #!/usr/bin/perl -w | |
| use strict; | |
| use lib 'extlib', 'lib', '../lib'; | |
| my %opts; | |
| use Getopt::Long; | |
| GetOptions("type=s", \my($type), | |
| "id=i", \my($id), | |
| "cols=s", \my($cols), |
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
| #!/usr/bin/perl -w | |
| use strict; | |
| use lib 'extlib', 'lib', '../lib'; | |
| my %opts; | |
| use Getopt::Long; | |
| GetOptions("type=s", \my($type), | |
| "id=i", \my($id), | |
| "cols=s", \my($cols), |
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
| digg.com | |
| yahoo.com | |
| news.google.com | |
| google.com | |
| reddit.com | |
| episteme.arstechnica.com | |
| slashdot.org | |
| stumbleupon.com | |
| daringfireball.net | |
| macsurfer.com |