Skip to content

Instantly share code, notes, and snippets.

Avatar

Marshall Roch mroch

View GitHub Profile
View gist:b42338e16fdb53c24a9cc164866e0a51
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Processing 6/6: [ocaml-variants.4.07.1+mingw64c: http]
+ C:\tools\cygwin\bin\curl.exe "--write-out" "%{http_code}\\n" "--retry" "3" "--retry-delay" "2" "--user-agent" "opam/2.0.5" "-L" "-o" "C:/Users/circleci/project/_opam/.opam-switch/sources/ocaml-variants.4.07.1+mingw64c/4.07.1+mingw64c2.tar.xz.part" "https://dl.bintray.com/fdopen/prebuild-win32-ocaml-packages/4.07.1+mingw64c2.tar.xz"
+ C:\tools\cygwin\bin\curl.exe "--write-out" "%{http_code}\\n" "--retry" "3" "--retry-delay" "2" "--user-agent" "opam/2.0.5" "-L" "-o" "C:/Users/circleci/project/_opam/.opam-switch/sources/ocaml-variants.4.07.1+mingw64c/4.07.1+mingw64c2.tar.xz.part" "https://dl.bintray.com/fdopen/prebuild-win32-ocaml-packages/4.07.1+mingw64c2.tar.xz"
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
-
0 0 0 0 0 0 0 0 --:
View foo.ml
let token buf =
match%sedlex buf with
| "foo" -> print_endline (Sedlexing.Utf8.lexeme buf)
| "bar" -> print_endline (Sedlexing.Utf8.lexeme buf)
| "foobar" -> print_endline (Sedlexing.Utf8.lexeme buf)
| eof -> print_endline "EOF"
| _ -> ()
let () =
let lexbuf = Sedlexing.Utf8.from_string "foobar" in
View gist:085d5e3f5fb5e08c85972fa5cffe4655
=== automatic-semicolon-insertion ===
[✗] FAIL: migrated_0000
root.body[0].body[1].range[1]: Expected 8, got 7.
root.body[0].body[1].loc.end.column: Expected 4, got 3.
[✗] FAIL: migrated_0001
root.body[0].body[1].range[1]: Expected 8, got 7.
root.body[0].body[1].loc.end.column: Expected 4, got 3.
[✓] PASS: migrated_0002
[✓] PASS: migrated_0003
[✓] PASS: migrated_0004
View gist:c8430e1dbb0d334e569a
### Keybase proof
I hereby claim:
* I am mroch on github.
* I am mroch (https://keybase.io/mroch) on keybase.
* I have a public key whose fingerprint is 25F5 5C05 E0FC D68E 3354 F29C BABD 2181 AD24 BB63
To claim this, I am signing this object:
View gist:cea448412bbe3533465c
$ flow dump-types tests/builtins/array.js
tests/builtins/array.js:3:5: Array<string>
tests/builtins/array.js:3:9-15: Array<string>
tests/builtins/array.js:3:10-14: string
tests/builtins/array.js:4:5: Array<number>
tests/builtins/array.js:4:9: Array<string>
tests/builtins/array.js:4:9-42: Array<number>
tests/builtins/array.js:4:16-41: (x: string) => number
tests/builtins/array.js:4:38: number
tests/builtins/array.js:5:5-13: string
@mroch
mroch / gist:7471758
Created Nov 14, 2013
Arrow function parameters
View gist:7471758
eval => 42; // ok
(eval) => 42; // ok
(eval, a) => 42; // ok
(a, a) => 42; // Syntax error per 14.1.1 (StrictFormalParameters : FormalParameters)
"use strict"; (eval) => 42; // Syntax error per 14.2.10
(eval) => { "use strict"; }; // Syntax error per 14.2.10
// Syntax errors per 14.1.1 (FormalParameters : FormalParameterList), since IsSimpleParameterList is false
// This is changing to be allowed?
View gist:1125898
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>untitled</title>
</head>
View gist:1026613
s/(\w+)\s+||=\s+/$1 = $1 ||/
View multiple-firefoxes.sh
#!/bin/bash
FIREFOX_APP=${1:-/Applications/Firefox.app}
[[ ! -d "$FIREFOX_APP" ]] && { echo "Could not find Firefox"; exit 1; }
FIREFOX_BIN="$FIREFOX_APP/Contents/MacOS/firefox-bin"
[[ ! -f "$FIREFOX_BIN" ]] && { echo "Can't find executable"; exit 1; }
FIREFOX_VERSION=`defaults read "$FIREFOX_APP/Contents/Info" CFBundleVersion | cut -d . -f 1,2`
@mroch
mroch / multi-firefox.sh
Created Mar 22, 2011
Makes Firefox.app open a version-specific profile so you can run multiple versions at the same time
We couldn’t find that file to show.
You can’t perform that action at this time.