This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en-AU"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="initial-scale=1, minimum-scale=1" /> | |
<title>Cross-browser/Electron file selection</title> | |
</head> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"source": { | |
"includePattern": "\\.+(mjs|js(on|x)?)$" | |
} | |
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
export const qNaN = Symbol("qNaN"); | |
export const sNaN = Symbol("sNaN"); | |
/** | |
* Convert a binary floating-point representation to a number. | |
* | |
* Source: IEEE 754-2008, table 3.5 – “Binary interchange format parameters” |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' # month name | |
.if "\nd"0" .nr m \n(mo-1 | |
.if "\nm"0" .ds ]m January | |
.if "\nm"1" .ds ]m February | |
.if "\nm"2" .ds ]m March | |
.if "\nm"3" .ds ]m April | |
.if "\nm"4" .ds ]m May | |
.if "\nm"5" .ds ]m June | |
.if "\nm"6" .ds ]m July | |
.if "\nm"7" .ds ]m August |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BIN = ../../var/bin | |
LIB = ../../var/lib | |
SRC-MAIN = print-status.mjs | |
SRC-QJS = qjs-entry.mjs | |
NAME = git-status | |
TMP = $(TMP-MAIN) $(TMP-QJS) | |
TMP-MAIN = $(LIB)/$(SRC-MAIN) | |
TMP-QJS = $(LIB)/$(SRC-QJS) | |
BUNDLE = $(LIB)/$(NAME).mjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// Recursive match example | |
let input = `$(foo $(bar $(baz) qux) qul $(quz) 1) $(almost lisp`; | |
const matches = []; | |
const stack = []; | |
const {length} = input; | |
for(let i = 0; i < length; ++i){ | |
let char = input[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEST = $(HOME)/Library/Tcl | |
TCL = /System/Library/Frameworks/Tcl.framework | |
TK = /System/Library/Frameworks/Tk.framework | |
X = /Developer/SDKs/MacOSX10.6.sdk/usr/X11/include | |
all: ../unix/Makefile | |
cd ../unix && $(MAKE) && $(MAKE) install | |
../unix/Makefile: | |
cd ../unix && ./configure --disable-stubs --with-tcl=$(TCL) --with-tk=$(TK) CPPFLAGS=-I$(X) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tell a program to completely shut the fuck up | |
(npm install get-options) >/dev/null 2>&1 | |
# Repeat a character a certain number of times | |
printf %100s | tr ' ' '=' | |
# Hide/show files or directories in Finder | |
chflags hidden /path/to | |
chflags nohidden /path/to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: http://web.archive.org/web/20130325033504/http://talleming.com/2009/10/01/fraction-fever-2/ | |
@figures = [ | |
zero | |
one | |
two | |
three | |
four | |
five | |
six | |
seven |