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
| Object.defineProperty(Object.prototype, "extend", { | |
| enumerable: false, | |
| value: function(from) { | |
| var props = Object.getOwnPropertyNames(from); | |
| var dest = this; | |
| props.forEach(function(name) { | |
| if (name in dest) { | |
| var destination = Object.getOwnPropertyDescriptor(from, name); | |
| Object.defineProperty(dest, name, destination); | |
| } |
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
| Object.defineProperty(Object.prototype, "extend", { | |
| enumerable: false, | |
| value: function(from) { | |
| var props = Object.getOwnPropertyNames(from); | |
| var dest = this; | |
| props.forEach(function(name) { | |
| if (name in dest) { | |
| sys.puts(sys.inspect(this)); |
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
| var sys = require('sys'); | |
| var couch = require('couchdb'); | |
| var graph = require('graph/Graph'); | |
| var vertex = require('graph/Vertex'); | |
| var edge = require('graph/Edge'); | |
| var matrix = require('graph/matrices/adjacency'); | |
| var client = couch.createClient(5984, 'localhost'); | |
| var viewUrl = '/graphs/_design/graph/_view/vertices'; |
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
| <?php | |
| class Default_Model_FooBar extends Zend_Db_Table_Abstract | |
| { | |
| /** | |
| * Local table name | |
| * | |
| * @var string $_name The name of the table associated with | |
| * this model class. | |
| */ |
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
| server { | |
| listen 80; | |
| server_name api.mydomain.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
| server { | |
| listen 80; | |
| server_name admin.api.mydomain.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
| $ ssh ubuntu@hostname-of-the-instance -i your-amazon-cert.pem | |
| Linux domU-12-21-38-34-69-D2 2.6.32-305-ec2 #9-Ubuntu SMP Thu Apr 15 04:14:01 UTC 2010 i686 GNU/Linux | |
| Ubuntu 10.04 LTS | |
| Welcome to the FRAPI API Server! | |
| * Documentation: http://wiki.github.com/frapi/frapi/ | |
| * User General Mailing List: http://groups.google.com/group/frapi-general | |
| * Or you can always reach us on IRC irc://frapi@irc.freenode.org | |
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
| <?php | |
| class Vendor_View_Helper_AutoEscape | |
| { | |
| protected $_unescapedVars = null; | |
| protected $_view; | |
| public function setView(Zend_View_Interface $view) | |
| { | |
| $this->_view = $view; |
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 Actionname(tornado.web.RequestHandler): | |
| def get(self): | |
| self.write({"elazar":"get"}) | |
| def post(self): | |
| self.write({"elazar":"post"}) | |
| def put(self): | |
| self.write({"elazar":"put"}) |