-
This is a numbered list.
-
I'm going to include a fenced code block as part of this bullet:
Code More Code
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace ParallelDemos | |
{ | |
class PLINQ | |
{ | |
// Run comparison of sequential vs parallel code using the TPL |
#!/bin/bash | |
# | |
# git-svn-rebase-all | |
# by Dave Ingram <http://github.com/dingram/> | |
# | |
SHELL=${SHELL:-/bin/bash} | |
curbranch=$(git symbolic-ref HEAD 2>/dev/null) | |
if [ $? -eq 0 ]; then | |
curbranch=${curbranch##*/} | |
else |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real
ffprobe -v quiet -print_format json -show_format -show_streams "lolwut.mp4" > "lolwut.mp4.json" |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
/******************* | |
I think the drag and drop code in here was mostly copy-pasted | |
from http://www.html5rocks.com/en/tutorials/file/dndfiles/ | |
I don't know if I changed it, or if I messed around with it... | |
It may or may not work in your browser, so make changes | |
and share if you need to. | |
-Mike | |
-- what's it do? |
protected override void RequestStartup(ILifetimeScope requestContainer, IPipelines pipelines, NancyContext context) | |
{ | |
pipelines.OnError.AddItemToEndOfPipeline((z, a) => | |
{ | |
log.Error("Unhandled error on request: " + context.Request.Url + " : " + a.Message, a); | |
return ErrorResponse.FromException(a); | |
}); | |
base.RequestStartup(requestContainer, pipelines, context); | |
} |
<?php | |
// API access key from Google API's Console | |
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array( $_GET['id'] ); | |
// prep the bundle | |
$msg = array |