Skip to content

Instantly share code, notes, and snippets.

View MarkBennett's full-sized avatar

Mark Bennett MarkBennett

View GitHub Profile
@MarkBennett
MarkBennett / gist:4e3d5346a0c8e12c5a3677581586aec9
Created November 27, 2023 18:08
Extracting contributor emails from a git repo
git shortlog -sne | awk '!/users.noreply.github.com/ {count=$1; $1=""; gsub(/^ /,"",$0); name=substr($0,1,index($0,"<")-1); gsub(/[ \t]+$/, "", name); email=tolower(substr($0,index($0,"<")+1)); gsub(/>/,"",email); print count", \""name"\", \""email"\""}' > contributors.csv
@MarkBennett
MarkBennett / json_by_line.js
Last active April 19, 2021 20:38
Output JSON from STDIN Line-By-Line And Pretty Print
/*
* Credit to the Node.js Docs for the line-by-line `ReadStream` example.
*
* https://nodejs.org/api/readline.html#readline_example_read_file_stream_line_by_line
*/
const readline = require('readline');
var stdin = process.stdin;
@MarkBennett
MarkBennett / installing-ruby-2.5.1-on-m1.md
Last active December 12, 2024 08:44
Installing Ruby 2.5 on Mac M1

SETUP ENVIRONMENT, PRIOR TO DEMO

doctl auth init

doctl k8s cluster create --region=tor1 rio-demo

START DEMO

Download and install Rio CLI

Async process failed: Cancel
dojo.js.uncompressed.js:5261 TypeError: Cannot read property 'slice' of undefined
at Object.renderGrid (null:1)
at Object.initReportGrid (null:1)
at Object.handleReportResponse (null:1)
at c (dojo.js.uncompressed.js:4819)
at a (dojo.js.uncompressed.js:4810)
at p.resolve (dojo.js.uncompressed.js:4974)
at d (dojo.js.uncompressed.js:4863)
at c (dojo.js.uncompressed.js:4840)

Keybase proof

I hereby claim:

  • I am markbennett on github.
  • I am markbennett (https://keybase.io/markbennett) on keybase.
  • I have a public key ASAVjXPhy1oIRWhregKYxoqgyJwNJ9DvOknpevsP_lvJBQo

To claim this, I am signing this object:

@MarkBennett
MarkBennett / gist:5701278c47c1567d915856995de22c10
Created March 1, 2018 05:16 — forked from scottburton11/gist:3222152
Audio Compression for Voiceover

About compression

Audio compression is used to reduce the dynamic range of a recording. Dynamic range is the difference between the loudest and softest parts of an audio signal. It was originally used to guard against defects when cutting wax and vinyl phonograph records, but generally became useful as a way of increasing the loudness of an audio recording without achieving distortion.

The goal of most compression applications is to increase the amplitude of the softest parts of a recording, without increasing the amplitude of the loudest parts.

Compressor anatomy

Compressors generally all have the same conceptual parts. However, not all compressors present variable controls for all parts to the user. If you don't see all of your compressor's controls here, there's a chance it either has a fixed value (and no control), or is named something else:

@MarkBennett
MarkBennett / receiver.html
Created August 19, 2014 03:16
Chromecast Demo
<html>
<body>
<script src="//www.gstatic.com/cast/sdk/libs/receiver/2.0.0/cast_receiver.js"></script>
<script>
(function() {
}());
</script>
</body>
</html>
import 'dart:math';
void main() {
List<String> names = '''
Zoe Washburne
Hoban Washburne
Malcolm Reynolds
Simon Tam
River Tam
Buffy Summers
@MarkBennett
MarkBennett / map.geojson
Created August 15, 2013 01:42
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.