Skip to content

Instantly share code, notes, and snippets.

<><> 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 --:
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
=== 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
@mroch
mroch / gist:7471758
Created November 14, 2013 18:22
Arrow function parameters
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?
<!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>
s/(\w+)\s+||=\s+/$1 = $1 ||/
#!/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 March 22, 2011 23:50
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.
#import "NSString+BashEscaping.h"
@implementation NSString (NSString_BashEscaping)
- (NSString *)bashString {
NSString *escapedString = [[self
stringByReplacingOccurrencesOfString:@"'" withString:@"'\\''"]
stringByReplacingOccurrencesOfString:@"!" withString:@"\\!"];
return [NSString stringWithFormat:@"'%@'", escapedString];
getViewportScrollY = function() {
var scrollY = 0;
if( document.documentElement && document.documentElement.scrollTop ) {
scrollY = document.documentElement.scrollTop;
}
else if( document.body && document.body.scrollTop ) {
scrollY = document.body.scrollTop;
}
else if( window.pageYOffset ) {
scrollY = window.pageYOffset;