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
PING (inline): 0.00====== PING (inline) ====== | |
10000 requests completed in 0.23 seconds | |
50 parallel clients | |
3 bytes payload | |
keep alive: 1 | |
97.11% <= 1 milliseconds | |
99.67% <= 2 milliseconds | |
99.92% <= 3 milliseconds | |
99.95% <= 4 milliseconds |
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
PING (inline): 0.00PING (inline): 38011.86====== PING (inline) ====== | |
10000 requests completed in 0.26 seconds | |
50 parallel clients | |
3 bytes payload | |
keep alive: 1 | |
84.69% <= 1 milliseconds | |
91.30% <= 2 milliseconds | |
92.09% <= 3 milliseconds | |
99.81% <= 4 milliseconds |
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
PING (inline): 0.00 | |
====== PING (inline) ====== | |
10000 requests completed in 0.21 seconds | |
50 parallel clients | |
3 bytes payload | |
keep alive: 1 | |
98.72% <= 1 milliseconds | |
99.90% <= 2 milliseconds | |
99.95% <= 3 milliseconds |
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
# ## Backbone model caching | |
# This is a simple solution to the problem "how do I make less requests to | |
# my server?". | |
# | |
# Whenever you need a model instance, this will check first if the same thing | |
# has been fetched before, and gives you the same instance instead of fetching | |
# the same data from the server again. | |
# | |
# Reusing the same instance also has the great side-effect of making your | |
# model changeable from one part of your code, with your changes being available |
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
upstream uwsgi { | |
ip_hash; | |
server 127.0.0.1:40000; | |
} | |
server { | |
listen 80; | |
server_name www.domain.com; | |
root /sites/mysite/; | |
access_log /sites/mysite/log/nginx/access.log; |
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
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<script src="jquery-1.7.1.min.js" type="text/javascript"></script> | |
<script src="jquery.muEditor.js" type="text/javascript"></script> | |
<script src="jquery.muEditor.i18n.js" type="text/javascript"></script> | |
<link rel="stylesheet" href="muEditor.css" type="text/css" media="screen"> | |
<script type="text/javascript"> | |
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
#!/usr/bin/env xdg-open | |
[Desktop Entry] | |
Name=TileMill | |
Categories=; | |
Comment=Fast and beautiful maps | |
Encoding=UTF-8 | |
Exec=/usr/bin/tilemill | |
Hidden=false | |
Icon=/usr/share/pixmaps/tilemill.png |
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
Several times in a month there pop up questions regarding query structure on the ElasticSearch user group. | |
Although there are good docs explaining this in depth probably the bird view of the Query DSL is necessary to | |
understand what is written there. There is even already some good external documentation available: | |
http://www.elasticsearch.org/tutorials/2011/08/28/query-dsl-explained.html | |
And there were attempts to define a schema: | |
http://groups.google.com/group/json-schema/browse_thread/thread/ae498ee818155d50 | |
https://gist.github.com/8887766ca0e7052814b0 |
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
var resque = require('coffee-resque').connect({ | |
host: 'localhost', | |
port: 6379 | |
}); | |
resque.enqueue('math', 'add', [1, 2]); | |
resque.enqueue('math', 'cp', ['/tmp/tmp.c', '/tmp/tmp.back']); | |
resque.enqueue('math', 'git', ['[email protected]:kuno/GeoIP.git', '/tmp/GeoIP/']); |
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
var spawn = require('child_process').spawn; | |
var resque = require('coffee-resque').connect({ | |
host: 'localhost', | |
port: 6379 | |
}); | |
var mathJobs = { | |
git: function(url, dest, callback) { | |
var clone = spawn('git', ['clone', url, dest]); |