Skip to content

Instantly share code, notes, and snippets.

View samdbeckham's full-sized avatar
🦊
come find me on GitLab

Sam Beckham samdbeckham

🦊
come find me on GitLab
View GitHub Profile
@samdbeckham
samdbeckham / 01-shape-up-to-kindle.md
Created May 4, 2022 09:35 — forked from jesstelford/01-shape-up-to-kindle.md
Read SHAPE UP by basecamp on a Kindle / reMarkable / eReader

Read Shape Up by basecamp on a kindle / reMarkable / eReader

Basecamp's new book Shape Up is now available online (https://basecamp.com/shapeup) to read page-by-page.

There is a .pdf version, but that's not the best format for Kindle / other eReaders. Instead, we can convert the page-by-page into an eReader friendly format.

Part 1: Convert to a single page

NOTE: This has only been tested on Chrome

@samdbeckham
samdbeckham / index.html
Last active March 25, 2020 16:42
array madness #jsbench #jsperf (http://jsbench.github.io/#c209b06bc19a6f8b25834334d92b5236) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>array madness #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>array madness</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
/**
* Generates an array of unique keys from an array of objects
* @param {Object[]} data The array to parse
* @returns {string[]} The unique keys
*/
const getUniqueKeys = data => Array.from(
new Set(
data.reduce((allKeys, entry) => [...allKeys, ...Object.keys(entry)], [])
)
);
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"font_options":
[
"gray_antialias",
"subpixel_antialias"
],
"font_size": 14,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
.tmp/
dev/
- index.html
includes/
- content.html
Gruntfile.js
package.json
@samdbeckham
samdbeckham / A-Pen-by-Sam-Beckham.markdown
Created September 20, 2013 14:50
A Pen by Sam Beckham.

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.