Skip to content

Instantly share code, notes, and snippets.

View avalanche123's full-sized avatar

Bulat Shakirzyanov avalanche123

View GitHub Profile
@avalanche123
avalanche123 / server.js
Created September 3, 2011 08:05 — forked from mixonic/server.js
Node.js + Socket.io + Bash. A collaborative terminal for your browser.
//
// 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
//
@avalanche123
avalanche123 / gist:1189560
Created September 2, 2011 19:14 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job:
Favorite Python project:
Favorite Conference:
Python Experience Level:
@avalanche123
avalanche123 / README.md
Created July 27, 2011 05:57 — forked from luciferous/README.md
A very small HTTP Client with Rack/WSGI style interfaces

Tiny HTTP

A very small HTTP client with Rack/WSGI style interfaces.

The setup

$sid = 'ACxxxxxxxxxxxx';
$token = '12345678';
$http = new TinyHttp("https://$sid:$token@api.twilio.com");
:+1:
:-1:
:airplane:
:art:
:bear:
:beer:
:bike:
:bomb:
:book:
:bulb:
@avalanche123
avalanche123 / app.php
Created March 24, 2011 21:15 — forked from igorw/app.php
<?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%