Skip to content

Instantly share code, notes, and snippets.

@sidupadhyay
sidupadhyay / gist:4024944
Created November 6, 2012 14:12
PDFlib radial shading
PDF_save($this->pdf);
PDF_setcolor($this->pdf, "both", "rgb", 0.0, 0.0, 0.0, 0.0);
$sh = PDF_shading(
this->pdf,
"radial", $this->pdf->PAGE_WIDTH/2, $this->pdf->PAGE_HEIGHT/2,
$this->pdf->PAGE_WIDTH/2, $this->pdf->PAGE_HEIGHT/2,
1.0, 0.5, 0.5, 0.0,
"r0 0 r1 500"
);
PDF_rect(this->pdf, 0, 0, $this->pdf->PAGE_WIDTH, $this->pdf->PAGE_HEIGHT);
@sidupadhyay
sidupadhyay / sample.config
Created June 7, 2011 05:27
Sample HA Proxy Config for Tornado/Socket.io Backends
global
maxconn 10000 # Total Max Connections. This is dependent on ulimit
nbproc 2
defaults
mode http
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000