Skip to content

Instantly share code, notes, and snippets.

View jyc's full-sized avatar

jyc

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jyc on github.
  • I am jyc (https://keybase.io/jyc) on keybase.
  • I have a public key whose fingerprint is D7CA 3311 655E 695A 2606 E982 7BA9 C8D3 276A 94FF

To claim this, I am signing this object:

type 'a jsont =
| String : string jsont
| List_of : 'a jsont -> 'a list jsont
let rec convert (type el) (t : el jsont) x : el option =
match t with
| String ->
begin match x with
| `String (s : string) -> Some s
<!doctype html>
<html>
<head>
<title>zero test</title>
<style>
div {
background-color: green;
width: 10em;
height: 10em;
width: calc(0);
package bibweb;
import static bibweb.Parsing.isMultilineValue;
import static bibweb.Parsing.rhsClosed;
import static easyIO.Regex.concat;
import static easyIO.Regex.constant;
import static easyIO.Regex.oneOrMore;
import static easyIO.Regex.parseToDelimiter;
import static easyIO.Regex.parseToPattern;
import static easyIO.Regex.whitespace;
@jyc
jyc / time.ml
Last active October 7, 2015 05:02
let times = Hashtbl.create 1
let time_start' ht id =
let (sum, _, n) =
if Hashtbl.mem ht id then Hashtbl.find ht id
else (0., 0., 0) in
Hashtbl.replace ht id (sum, Sys.time (), n)
let time_start = time_start' times
(bitmatch (u8vector 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1)
(((a double big) (b double big) (c boolean) (d boolean))
(vector a b c d)))
Press ENTER or type command to continue
; outputs #(0.0 0.0 1 1)
(write (bitmatch (u8vector 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1)
(((a double big) (b double big) (c 8) (d 8))
(vector a b c d))))
# OPAM config report
# opam-version 1.2.2
# self-upgrade no
# os linux
# external-solver aspcud $in $out $criteria
# criteria -count(removed),-notuptodate(request),-sum(request,version-lag),-count(down),-notuptodate(changed),-count(changed),-notuptodate(solution),-sum(solution,version-lag)
# jobs 1
# repositories 1* (http)
# pinned 0
# current-switch 4.02.1
Dec 09 13:14:59 jc-t430-arch kernel: wlan0: associate with 00:1a:1e:95:57:01 (try 1/3)
Dec 09 13:14:59 jc-t430-arch kernel: wlan0: RX AssocResp from 00:1a:1e:95:57:01 (capab=0x431 status=0 aid=1)
Dec 09 13:14:59 jc-t430-arch kernel: wlan0: associated
Dec 09 13:15:10 jc-t430-arch wpa_actiond[438]: Interface 'wlan0' reestablished connection to network 'eduroam'
[jonathan@jc-t430-arch jyc]$ make html
pelican /home/jonathan/blogs/jyc/content -o /home/jonathan/blogs/jyc/output -s /home/jonathan/blogs/jyc/pelicanconf.py
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 449, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 742, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.4/site-packages/pkg_resources.py", line 643, in resolve
raise VersionConflict(dist, req) # XXX put more info here
pkg_resources.VersionConflict: (pelican 3.4.0 (/usr/lib/python3.4/site-packages), Requirement.parse('pelican==3.3'))
switch (json_last_error()) {
case JSON_ERROR_NONE:
echo ' - No errors';
break;
case JSON_ERROR_DEPTH:
echo ' - Maximum stack depth exceeded';
break;
case JSON_ERROR_STATE_MISMATCH:
echo ' - Underflow or the modes mismatch';