I hereby claim:
- I am m-r-r on github.
- I am mrr (https://keybase.io/mrr) on keybase.
- I have a public key whose fingerprint is 5A67 EC9B 8B23 B53D 6697 338B 5E77 1384 CC52 82E8
To claim this, I am signing this object:
// http://adventofcode.com/2017/day/2 | |
// Parse the input into a two-dimensional array of numbers | |
const parseSpreadsheetRow = input => input.split(/\s+/).map(n => parseInt(n)); | |
const parseSpreadsheet = input => input.split('\n').map(parseSpreadsheetRow); | |
// Find the highest and lowest values in a list | |
const max = values => | |
values.reduce((previous, current) => Math.max(previous, current)); | |
const min = values => |
// http://adventofcode.com/2017/day/1 | |
// Sums the digits matching the next digit. | |
// The list is circular: is the first and last digits are the same, the last digit matches. | |
const sumMatchesNext = input => | |
Array.from(String(input)) // Turn the input into an array of characters | |
.map(Number) // Turn the caracters into number | |
.reduce((sum, digit, i, digits) => { | |
const index = (i + 1) % digits.length; // The list is circular | |
// If the digit is the same as the next digit, add it to the sum |
type Freq = f32; | |
#[derive(Clone, Debug)] | |
pub struct Note(u8, u8, Freq); | |
impl Note { | |
pub fn number(&self) -> u8 { | |
self.0 | |
} | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
.separator { | |
display: block; | |
width: 100%; | |
font-weight: 400; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
(function () { | |
"use strict"; |
I hereby claim:
To claim this, I am signing this object:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<script src='http://cdn.ractivejs.org/latest/ractive.js'></script> | |
<script src='http://cdn.jsdelivr.net/ractive.adaptors-backbone/latest/ractive-adaptors-backbone.min.js'></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script> | |
<script id="app-template" type="text/ractive"> | |
<header id="header"> |
function math --description 'Perform math calculations in bc' | |
if count $argv > /dev/null | |
switch $argv[1] | |
case -h --h --he --hel --help | |
__fish_print_help math | |
return 0 | |
end | |
set -lx LC_NUMERIC C | |
set -lx BC_LINE_LENGTH 0 | |
set -l out (echo $argv | bc) |
test |
{% extends "base.html" %} | |
{% block content %} | |
<section id="content"> | |
<h1>Archives for {{ SITENAME }}</h1> | |
<dl> | |
{% for article in articles %} | |
{% if loop.first or article.date.strftime('%Y %m') != articles[loop.index0-1].date.strftime('%Y %m') %} | |
<dt> | |
<h2>{{ article.date.strftime('%B %Y') }}</h2> | |
<ul> |