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
| module Securable | |
| def self.included(base) | |
| base.extend(ClassMethods) | |
| end | |
| class Secured | |
| def initialize(p, o) | |
| @o = o | |
| @o.class.methods_with_permissions(p) {|m| define_proxy_method(m)} | |
| end | |
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
| public class Test{ | |
| [Serializable] | |
| [Securable] | |
| [ThisPropertyIsAwesome] | |
| public string Name{get; set;} | |
| } |
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 User < Model | |
| include CouchObject::Persistable | |
| include Securable | |
| with_attr_reader :username do | |
| min_read_permission :guest | |
| end | |
| with_attr_reader :email, :password do | |
| min_read_permission :owner |
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 Class | |
| def with_attr_reader(*args, &b) | |
| with_attr(:attr_reader, *args, &b) | |
| end | |
| def with_attr_writer(*args, &b) | |
| with_attr(:attr_writer, *args, &b) | |
| end | |
| def with_attr_accessor(*args, &b) |
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 |
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
| [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
| from setuptools import setup | |
| setup(name='twittersmash', | |
| version='0.1', | |
| description='Ars Technica\'s twitter publishing application', | |
| author='Clint Ecker, Kurt Mackey', | |
| author_email='clint@arstechnica.com', | |
| 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
| 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; |
OlderNewer