by Asim Jalis, MetaProse.com
Create a file __main__.py containing:
print "Hello world from Python"
Zip up the Python files (in this case just this one file) into app.zip by typing:
| // | |
| // GFFParallaxNode.h | |
| // | |
| // Created by Rolando Abarca on 12/14/09. | |
| // | |
| #import <Foundation/Foundation.h> | |
| #import "cocos2d.h" | |
| #define MAX_PARALLAX_CHILDREN 25 |
| i | |
| me | |
| my | |
| myself | |
| we | |
| our | |
| ours | |
| ourselves | |
| you | |
| your |
| (function(){ | |
| var parse = JSON.parse; | |
| JSON = { | |
| stringify: JSON.stringify, | |
| validate: function(str){ | |
| /* | |
| Websockets using http://socket.io/ | |
| Also with express web mvc framework http://expressjs.com/ | |
| */ | |
| var app = require('express').createServer(), | |
| io = require('socket.io').listen(app), | |
| port = 88; |
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
| // set-up a connection between the client and the server | |
| var socket = io.connect(); | |
| // let's assume that the client page, once rendered, knows what room it wants to join | |
| var room = "abc123"; | |
| socket.on('connect', function() { | |
| // Connected, let's sign-up for to receive messages for this room | |
| socket.emit('room', room); | |
| }); |
| A warning occurred (42 apples) | |
| An error occurred |
| <?php | |
| $mongodb = new Mongo("mongodb://username:password@localhost/database_name"); | |
| $database = $mongodb->database_name; | |
| $collection = $database->collection; | |
| $page = isset($_GET['page']) ? (int) $_GET['page'] : 1; | |
| $limit = 12; | |
| $skip = ($page - 1) * $limit; | |
| $next = ($page + 1); | |
| $prev = ($page - 1); |
| #!/bin/bash | |
| # setup | |
| FILES=name_of_file_to_match_*.mp4 | |
| SEEK_POINT=00:00:30 | |
| IMG_FORMAT=png | |
| FRAME_SIZE=150X100 | |
| DEST=thumbnails | |
| for f in $FILES |
by Asim Jalis, MetaProse.com
Create a file __main__.py containing:
print "Hello world from Python"
Zip up the Python files (in this case just this one file) into app.zip by typing: