Skip to content

Instantly share code, notes, and snippets.

View blowery's full-sized avatar

Ben Lowery blowery

View GitHub Profile
.thelink a {
font-family: 'OFL Sorts Mill Goudy TT', serif;
text-decoration: none;
}
.giantcypress div.npf-link-block {
display: block;
margin: 0;
border: none;
@blowery
blowery / index.js
Last active September 22, 2020 19:27
Tesla Media Transformer
const fs = require("fs");
const path = require("path");
const mkdirp = require("mkdirp");
const mp3tag = require("mp3tag");
const _ = require("lodash");
const TagData = require("mp3tag/tagdata");
// from
const FROM_DIR = path.join(__dirname, "Rips");
const TO_DIR = path.join(__dirname, "ForTesla");
@blowery
blowery / index.js
Last active September 22, 2020 19:25
Tesla Media Transformer
const fs = require("fs");
const path = require("path");
const mkdirp = require("mkdirp");
const mp3tag = require("mp3tag");
const _ = require("lodash");
const TagData = require("mp3tag/tagdata");
// from
const FROM_DIR = path.join(__dirname, "Rips");
const TO_DIR = path.join(__dirname, "ForTesla");
Object.fromEntries(
document.cookie.split(';')
.map(cv=>cv.trim().split('='))
.map(([k,v])=>[k,decodeURIComponent(v)])
)
@blowery
blowery / autoscroll.js
Last active July 14, 2020 19:56
Autoscroller
(function (pixelsToScroll) {
const byteFormatter = new Intl.NumberFormat(undefined, {
style: "unit",
unit: "megabyte",
maximumFractionDigits: 0,
minimumFractionDigits: 0,
});
const numberFormatter = new Intl.NumberFormat();
const formatBytes = (bytes) => byteFormatter.format(bytes / (1024 * 1024));
const formatPercentage = (dec) => `${Math.round(100 * dec)}%`;
diff --git a/client/lib/browser-storage/index.ts b/client/lib/browser-storage/index.ts
index 61dfb87f03..9b2eb97305 100644
--- a/client/lib/browser-storage/index.ts
+++ b/client/lib/browser-storage/index.ts
@@ -17,7 +17,7 @@ const STORE_NAME = 'calypso_store';
const SANITY_TEST_KEY = 'browser-storage-sanity-test';
-const getDB = once( () => {
+const getDB = () => {
{
"name": "blowery-npx-oddity",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"prepare": "npx rimraf foo"
},
"keywords": [],
"author": "",
{
"name": "blowery-npx-oddity",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prepare": "npx rimraf foo"
},
"keywords": [],
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Play</title>
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Play</title>
</head>
<body>