This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./configure --add-module=/home/svdgraaf/tmp/nginx/ngx_http_bytes_filter_module-57365655ee44 --with-http_geoip_module --add-module=/home/svdgraaf/tmp/nginx/ngx_secure_download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen *:80; | |
location = /crossdomain.xml { | |
root /var/www/html/; | |
} | |
location = /test.html { | |
root /var/www/html/; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import PyV8, duh! | |
import PyV8 | |
# define a class which methods should be available in Javascript | |
class epicClass(PyV8.JSClass): | |
def ponies(self): | |
return "Ponies!" | |
def doubletime(self, what, amount): | |
for i in range(0, amount): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- bitmovr.lua | |
-- simple lua webserver which starts to listen on a socket, and | |
-- forwards all GET calls it receives to a backend server | |
-- this is extremely lightweight, as it will move the bits from one | |
-- socket to another, without any disk i/o | |
-- | |
-- Depends on md5, io, LuaSockets and Memcached.lua | |
-- | |
-- Application flow: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a dir | |
mkdir foobar | |
cd foobar | |
# instantiate a virtual environment | |
virtualenv --no-site-packages . | |
# start your virtualenv | |
source bin/activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"environments": [], | |
"name": "focus", | |
"repository": { | |
"location": "[email protected]:hub-nl/nl.focusmedia.git", | |
"name": "foo", | |
"variant": "git" | |
}, | |
"variant": "python" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# varnish | |
sudo yum remove varnish* | |
sudo rpm --nosignature -i http://repo.varnish-cache.org/redhat/varnish-3.0/el6/noarch/varnish-release-3.0-1.el6.noarch.rpm | |
sudo yum install varnish-3.0.3 | |
sudo yum install pcre-devel libedit libedit-devel | |
# varnish source | |
wget http://repo.varnish-cache.org/source/varnish-3.0.3.tar.gz | |
tar -zxvf varnish-3.0.3.tar.gz | |
./configure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import the abtesting vmod | |
import abtest; | |
sub vcl_deliver { | |
# only continue, if the config file with all the rules can be loaded | |
if (abtest.load_config("/etc/varnish/abtest-rules.cfg") == 0) { | |
# if there isn't a named cookie 'ab' in the request, we can add one | |
if (req.http.Cookie !~ "ab=") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"170038E91C": "1003729691", | |
"17003F5A1D": "1004151834" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert [inputfilename.jpg] -gravity north -background black -extent [width]x[height] +repage -box black -fill white -pointsize 12 -gravity southwest -annotate +3+3 '(c)Unicorns and magic sparkledust inc.' -gravity southeast -annotate +3+3 "`date +%H:%I`" -quality 99% output.png |
OlderNewer