Skip to content

Instantly share code, notes, and snippets.

@crissdev
crissdev / print_filter.js
Created April 25, 2020 16:57 — forked from xhinking/print_filter.js
Crossfilter & dc filter printer source: codeproject
function print_filter(filter) {
var f=eval(filter);
if (typeof(f.length) != "undefined") {}else{}
if (typeof(f.top) != "undefined") {f=f.top(Infinity);}else{}
if (typeof(f.dimension) != "undefined") {f=f.dimension(function(d) { return "";}).top(Infinity);}else{}
console.log(filter+"("+f.length+") = "+JSON.stringify(f).replace("[","[\n\t").replace(/}\,/g,"},\n\t").replace("]","\n]"));
}
@crissdev
crissdev / byte.js
Created May 17, 2021 17:49
Using Symbol.toPrimitive and toJSON method for better code
class Byte {
#value
constructor(value = 0) {
this.#value = value
}
toJSON() {
return this.#value
}

Install ffmpeg

brew install ffmpeg

Download file through url, like this:

ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "http://url-file.domain.m3u8" -c copy video.mp4
@crissdev
crissdev / Base32.cs
Created April 12, 2024 10:11 — forked from erdomke/Base32.cs
Base32 Encoding and Decoding in C#
/*
* Derived from https://github.com/google/google-authenticator-android/blob/master/AuthenticatorApp/src/main/java/com/google/android/apps/authenticator/Base32String.java
*
* Copyright (C) 2016 BravoTango86
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@crissdev
crissdev / .gitignore
Created March 23, 2025 11:35 — forked from curran/.gitignore
a set of scripts to pull the git history from the d3 git repositories
d3*
data
*.swp
@crissdev
crissdev / 01-shape-up-to-kindle.md
Created January 21, 2026 12:41 — 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