Skip to content

Instantly share code, notes, and snippets.

View tmcw's full-sized avatar
💭
merging your prs

Tom MacWright tmcw

💭
merging your prs
View GitHub Profile

Quick thoughts on implicit casting

What's implicit casting? Say, you have a function that returns a negative number, like

function negate(x) { return -x; }

Implicit casting is saying that 'if the user provides a string that can be coerced to a number as input, then we’ll turn it into a number. For example

@tmcw
tmcw / 2018-08-14.csv
Created August 28, 2018 17:41
Spotify / Aretha Franklin
Position Track Name Artist Streams URL
1 In My Feelings Drake 6318218 https://open.spotify.com/track/2G7V7zsVDxg1yRsu7Ew9RJ
2 No Brainer DJ Khaled 3665072 https://open.spotify.com/track/5WvAo7DNuPRmk4APhdPzi8
3 FEFE (feat. Nicki Minaj & Murda Beatz) 6ix9ine 3556629 https://open.spotify.com/track/2E124GmJRnBJuXbTb4cPUB
4 Girls Like You (feat. Cardi B) Maroon 5 3517483 https://open.spotify.com/track/7fa9MBXhVfQ8P8Df9OEbD8
5 SICKO MODE Travis Scott 3454664 https://open.spotify.com/track/2xLMifQCjDGFmkHkpNLD9h
6 Lucid Dreams Juice WRLD 3207568 https://open.spotify.com/track/0s3nnoMeVWz3989MkNQiRf
7 Eastside (with Halsey & Khalid) benny blanco 3166420 https://open.spotify.com/track/0d2iYfpKoM0QCKvcLCkBao
8 I Like It Cardi B 3034522 https://open.spotify.com/track/58q2HKrzhC3ozto2nDdN4z
9 In My Mind Dynoro 2839003 https://open.spotify.com/track/0E9ZjEAyAwOXZ7wJC0PD33
Position Track Name Artist Streams URL
1 In My Feelings Drake 4785390 https://open.spotify.com/track/2G7V7zsVDxg1yRsu7Ew9RJ
2 Girls Like You (feat. Cardi B) Maroon 5 3152633 https://open.spotify.com/track/7fa9MBXhVfQ8P8Df9OEbD8
3 FEFE (feat. Nicki Minaj & Murda Beatz) 6ix9ine 2929835 https://open.spotify.com/track/2E124GmJRnBJuXbTb4cPUB
4 SICKO MODE Travis Scott 2912470 https://open.spotify.com/track/2xLMifQCjDGFmkHkpNLD9h
5 Lucid Dreams Juice WRLD 2904727 https://open.spotify.com/track/0s3nnoMeVWz3989MkNQiRf
6 No Brainer DJ Khaled 2866617 https://open.spotify.com/track/5WvAo7DNuPRmk4APhdPzi8
7 Eastside (with Halsey & Khalid) benny blanco 2824072 https://open.spotify.com/track/0d2iYfpKoM0QCKvcLCkBao
8 God is a woman Ariana Grande 2793371 https://open.spotify.com/track/5OCJzvD7sykQEKHH7qAC3C
9 In My Mind Dynoro 2685118 https://open.spotify.com/track/0E9ZjEAyAwOXZ7wJC0PD33
59
73 41
52 40 09
26 53 06 34
10 51 87 86 81
61 95 66 57 25 68
90 81 80 38 92 67 73
30 28 51 76 81 18 75 44
84 14 95 87 62 81 17 78 58
21 46 71 58 02 79 62 39 31 09
MMMMDCLXXII
MMDCCCLXXXIII
MMMDLXVIIII
MMMMDXCV
DCCCLXXII
MMCCCVI
MMMCDLXXXVII
MMMMCCXXI
MMMCCXX
MMMMDCCCLXXIII
package main
import (
"encoding/json"
"fmt"
"github.com/paulmach/go.geo"
"github.com/qedus/osmpbf"
"io"
"log"
"os"
@tmcw
tmcw / README.md
Last active August 7, 2018 05:03
Strava Bitbar plugin

A bitbar plugin for Strava. Shows you how many miles you've run so far this year.

@tmcw
tmcw / README.md
Last active October 10, 2021 12:08

IPO Founding date and offer date

From Jay R. Ritter, Founding dates for firms going public in the U.S. during 1975-2017 (updated January 2018

Users of this data should credit the source as the Field-Ritter dataset of company founding dates, as used in Laura C. Field and Jonathan Karpoff "Takeover Defenses of IPO Firms" in the October 2002 Journal of Finance Vol. 57. No. 5, pp. 1857-1889, and Tim Loughran and Jay R. Ritter, "Why Has IPO Underpricing Changed Over Time?" in the Autumn 2004 Financial Management Vol. 33, No. 3, pp. 5-37. Further details about the data can be found in Appendix A

thisWillBeFormatted(2, 3)
var prettier = require("./");
const input = `function initGL(canvas) {
try {
var gl =
canvas.getContext("webgl", {antialias: false, depth: false});
gl.viewportWidth = canvas.width;
gl.viewportHeight = canvas.height;
var ext = gl.getExtension("OES_texture_float");
} catch(e) {
} finally {