Please go here for latest post and feel free to comment
[new post] (https://gist.github.com/idibidiart/49a095b6bc528638f34f)
~ # redis-benchmark -s /var/run/redis/redis.sock -q -n 10000 | |
PING_INLINE: 156250.00 requests per second | |
PING_BULK: 196078.44 requests per second | |
SET: 212765.97 requests per second | |
GET: 185185.19 requests per second | |
INCR: 217391.30 requests per second | |
LPUSH: 200000.00 requests per second | |
LPOP: 222222.22 requests per second | |
SADD: 204081.64 requests per second | |
SPOP: 217391.30 requests per second |
function makeStyle(defaults, tagName) { | |
tagName = tagName || 'div'; | |
var Style = React.createClass({ | |
getDefaultProps: function() { | |
return assign({}, defaults); | |
}, | |
render: function() { | |
var style = assign({}, this.props); | |
delete style.children; |
type alias Bounds = { | |
left : Float, | |
right : Float, | |
top : Float, | |
bottom : Float | |
} | |
bounds : Bounds | |
bounds = Bounds 0 0 0 0 |
The Unixbench results for the Hetzner EX 4S servers recently featured on HackerNews. (dd and htparm tests at the bottom) | |
- http://news.ycombinator.com/item?id=3537513 | |
- http://www.hetzner.de/en/hosting/produkte_rootserver/ex4s | |
To compare with AWS, see the Unixbench results from: http://blog.cloudharmony.com/2010/05/what-is-ecu-cpu-benchmarking-in-cloud.html | |
TLDR; the €59/mo EX 4S scores higher (1729) than AWS m2.4xlarge (1511) on single threaded loads. | |
Postscript |
class Enum < Hash | |
def initialize(*members) | |
super() | |
@rev = {} | |
members.each_with_index {|m,i| self[i] = m } | |
end | |
def [](k) | |
super || @rev[k] # || raise ArgumentError, "#{k} is not a member of this enum" | |
end | |
def []=(k,v) |
Please go here for latest post and feel free to comment
[new post] (https://gist.github.com/idibidiart/49a095b6bc528638f34f)
// devDependencies in package.json: | |
"require-reload": "0.2.2", | |
"react-transform-hmr-no-accept": "1.0.1", // not published, get it here: https://github.com/brandonbloom/react-transform-hmr | |
// in babelrc: | |
"env": { | |
"development": { | |
"plugins": [ |
defmodule StageInspector do | |
alias Experimental.{GenStage} | |
use GenStage | |
def init(type) when type in [:consumer, :producer_consumer] do | |
{type, type} | |
end | |
def handle_events(events, _from, state = :consumer) do | |
Enum.each events, &inspect_event/1 |
Goal of this Document / Gist is to layout the resources and challenges to writing a complete modern web app with Phoenix and Elixir as the state of the projects are starting on June 2015
// Simple wrapper to use bootstrap's grid system to position elements side-by-side | |
var VerticalFieldsElement = React.createClass({ | |
render: function() { | |
return dom.div( | |
{ className: 'clearfix' }, | |
React.Children.map(this.props.children, function(child) { | |
if(!child) { | |
return child; | |
} |