A very small HTTP client with Rack/WSGI style interfaces.
$sid = 'ACxxxxxxxxxxxx';
$token = '12345678';
$http = new TinyHttp("https://$sid:[email protected]");
// | |
// This server will start a bash shell and expose it | |
// over socket.io to a browser. See ./term.html for the | |
// client side. | |
// | |
// You should probably: | |
// | |
// npm install socket.io | |
// curl -O https://github.com/LearnBoost/Socket.IO/raw/master/socket.io.min.js | |
// |
Day job: | |
Favorite Python project: | |
Favorite Conference: | |
Python Experience Level: |
A very small HTTP client with Rack/WSGI style interfaces.
$sid = 'ACxxxxxxxxxxxx';
$token = '12345678';
$http = new TinyHttp("https://$sid:[email protected]");
:+1: | |
:-1: | |
:airplane: | |
:art: | |
:bear: | |
:beer: | |
:bike: | |
:bomb: | |
:book: | |
:bulb: |
<?php | |
require_once __DIR__.'/silex.phar'; | |
use Silex\Application; | |
$app = new Application(); | |
$app->get('/hello', function() { | |
return 'get hello'; |
<?php | |
namespace Application\HelloBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
/** @Service(id="hello_controller") */ | |
class HelloController extends Controller | |
{ | |
protected $userRepository; | |
protected $logger; |
<?php | |
function fitzify ($input) { | |
return implode(\PHP_EOL, array_map(function($line) { | |
return $line . (rand(1, 4) == 1 ? str_repeat("\t", rand(1, 4)) : ''); | |
}, explode(\PHP_EOL, $input))); | |
} | |
function fitzify_file($path) { | |
if ( ! is_file($path)) { |
PASS #1 - SMALL FILE | |
============================================= | |
HTMLPurifier Pass #1 - Small File: | |
---------------------------------------------------- | |
marker time index ex time perct | |
---------------------------------------------------- | |
Start 1278614890.25844500 - 0.00% | |
---------------------------------------------------- | |
Stop 1278614893.65603000 3.397585 100.00% |