Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name No YouTube Volume Normalization
// @namespace https://gist.github.com/abec2304
// @match https://www.youtube.com/*
// @grant none
// @version 2.1
// @author abec2304
// @description Enjoy YouTube videos at their true volume
// @inject-into content
// @run-at document-start

Motivation

  • expression-oriented programming one of the great advances of FP
  • expressions plug together like legos, making more malleable programming experience in-the-small

Examples

Write in an expression-oriented style, scoping variables as locally as possible:

@Pathoschild
Pathoschild / google-sheets-color-preview.js
Last active July 4, 2023 12:07
A Google Sheets script which adds color preview to cells. When you edit a cell containing a valid CSS hexadecimal color code (like #000 or #000000), the background color is changed to that color and the font color is changed to the inverse color for readability.
/*
This script is meant to be used with a Google Sheets spreadsheet. When you edit a cell containing a
valid CSS hexadecimal color code (like #000 or #000000), the background color will change to that
color and the font color will be changed to the inverse color for readability.
To use this script in a Google Sheets spreadsheet:
1. go to Tools » Script Editor;
2. replace everyting in the text editor with this code;
3. click File » Save;
@samth
samth / problems.md
Last active August 29, 2015 13:57
Reproducing reproduction.
@pbailis
pbailis / reproducibility.md
Last active February 15, 2016 12:18
Reproducing (un)reproducibility results

edit: see http://cs.brown.edu/~sk/Memos/Examining-Reproducibility/

Not deserving of a full post, but nonetheless worth writing about: @ongardie, @aalevy, and a few others on Twitter were surprised by the number of papers that were flagged as "not reproducible" according to the recent study at http://reproducibility.cs.arizona.edu. Digging deeper, it appeared that 1.) "code builds" is the standard for reproducibility in this study and that 2.) many broken builds were the result of missing dependencies on the researchers' systems.

I tried reproducing a few of the authors' "unreproducible" results. It's hard to vet 600+ research code repositories, but, with a little effort (< ~10 minutes each?), I was able to get all of the following to actually build (on Ubuntu 13.10). This doesn't inspire confidence in the reproducibility of the study results.

Peter pbailis@cs.berkeley.edu

@sjoerdvisscher
sjoerdvisscher / soreifygadt.hs
Created September 1, 2012 22:49
Recovering sharing in a GADT
{-# LANGUAGE GADTs, TypeFamilies, FlexibleInstances, RankNTypes #-}
import Data.Reify
import Control.Applicative
import Data.Map
data Ast e where
IntLit :: Int -> Ast Int
Add :: Ast Int -> Ast Int -> Ast Int
BoolLit :: Bool -> Ast Bool
IfThenElse :: Ast Bool -> Ast e -> Ast e -> Ast e
@mbostock
mbostock / .block
Last active November 8, 2019 07:43
Force Layout from CSV
license: gpl-3.0
LaTeX Cheatsheet
----------------
Common mistakes.
Never use "", use `` and ''.
endash = -- | emdash = --- | minus sign will appear in formulae
In URLs, use $\sim$ rather than ~.
"he/she" should be "he\slash she"
Simple Formatting.