Skip to content

Instantly share code, notes, and snippets.

View shurizzle's full-sized avatar
🤌

shurizzle shurizzle

🤌
  • Vodafone, Internet
View GitHub Profile
@shurizzle
shurizzle / gist:893694
Created March 30, 2011 01:23
FastCGI dispatcher for Padrino in ruby 1.9.x (needed for lighty)
#!/usr/bin/env ruby
# require rack fastcgi {{{
require 'rack/handler/fastcgi'
# support for ruby 1.9.x {{{
class FCGI; class ValuesRecord
def self::read_length(buf)
if buf.getbyte(0) >> 7 == 0
buf.slice!(0, 1).getbyte(0)
#!/usr/bin/env ruby
# who the fuck said Ruby couldn't be hacky, NEVER DO THIS IT IS STUPID
# AND DOING IT WRONG TOO
require 'socket'
# DEBUG {{{
class TCPSocket
alias __gets__ gets
def gets(*args)
/*
* Very simple mysql breaker
* DEVELOPER: shura, member of HUF, see https://hackers-uf.org/
*
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details.
*