#What are the current instructions?
They seem to expect Ubuntu: http://habitrpg.wikia.com/wiki/Setting_up_HabitRPG_locally
#Install Fedora
I'm using Fedora 21 Server in this attempt.
#Get NodeJS
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 |
#What are the current instructions?
They seem to expect Ubuntu: http://habitrpg.wikia.com/wiki/Setting_up_HabitRPG_locally
#Install Fedora
I'm using Fedora 21 Server in this attempt.
#Get NodeJS
/*Content originally from CodeSchool's "try jQuery" lesson. http://try.jquery.com/levels/4/challenges/16 */ | |
$(document).ready(function() { | |
/* | |
* this first part fetches the price and multiplies for the number input in the form | |
*/ | |
$("#nights").on("keyup", function() { | |
var nights = +$(this).val(); | |
var dailyPrice = +$(this).closest(".tour").data("daily-price"); | |
$("#total").text(nights * dailyPrice); | |
$("#nights-count").text($(this).val()); |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |