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
#include <sys/types.h> | |
#include <unistd.h> // write | |
#include <fcntl.h> // open, close | |
#include <stdio.h> // fprintf | |
#include <string.h> // strerror, strdup, strchr | |
#include <stdlib.h> // free, EXIT_* | |
#include <sys/mman.h> // mmap, munmap | |
#include <sys/stat.h> // fstat | |
#include <errno.h> // errno | |
#include <dirent.h> // DIR, dirent, opendir, readdir |
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 |
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
#!/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
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 | |
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
"use strict"; | |
const {TextBuffer, TextEditor, Range, Point} = require("atom"); | |
const ScreenLineBuilder = loadFromCore("text-buffer/lib/screen-line-builder"); | |
const {emitText} = ScreenLineBuilder.prototype; | |
const exoticNewlines = "\r"; | |
ScreenLineBuilder.prototype.emitText = function(...args){ | |
const {buffer} = this.displayLayer; | |
const [char] = args; |
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)?)$" | |
} | |
} |
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
' # 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 |