Skip to content

Instantly share code, notes, and snippets.

@se4c0met
se4c0met / ls.php
Created November 23, 2012 09:33
Browse AppFog file system (PHP instance)
<?php
/*
due to the open_basedir restriction, $tgtPath must be something like the following path param:
http://<your domain>.aws.af.cm/ls.php?path=/var/vcap.local/dea/apps/f-0-21341234123412abcdefgc75cc0f96b9/app/
to discover what are the allowed paths, try supplying any path, e.g. '/' then view the error logs via:
af logs <your app name>
*/
@se4c0met
se4c0met / wsgi.py
Created November 23, 2012 08:15
Browse AppFog file system (Python WSGI instance)
import os
from bottle import Bottle,route,static_file,run
from StringIO import StringIO
application = app = Bottle()
@app.route('/')
def hello():
return "<pre>Usage: Browse http://<your domain>.aws.af.cm/ls//"
@app.route('/ls/<filename:path>')