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
open Higher | |
module F = struct | |
module Id : Newtype1 with type 'a s = 'a = | |
Newtype1 ( struct type 'a t = 'a end ) | |
module Const (T : sig type t end) : Newtype1 with type 'a s = T.t = | |
Newtype1 ( struct type 'a t = T.t end ) |
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
(* | |
* ocamlfind ocamlopt -linkpkg -syntax camlp4o | |
* -package lwt,lwt.syntax,lwt.unix,sexplib | |
* format_sexp.ml -o format_sexp | |
*) | |
open Lwt | |
open Sexplib |
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
((state-in | |
((handshake | |
((version TLS_1_2) (machina (Server ServerInitial)) | |
(config | |
((ciphers | |
(TLS_RSA_WITH_AES_256_CBC_SHA TLS_DHE_RSA_WITH_AES_256_CBC_SHA TLS_RSA_WITH_AES_128_CBC_SHA TLS_DHE_RSA_WITH_AES_128_CBC_SHA TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA | |
TLS_RSA_WITH_3DES_EDE_CBC_SHA TLS_RSA_WITH_RC4_128_SHA TLS_RSA_WITH_RC4_128_MD5)) | |
(version (TLS_1_2 TLS_1_0)) (hashes (SHA512 SHA384 SHA256 SHA MD5)) | |
(use_rekeying true) (requre_sec_rek true) (validator ()) (peer_name ()) | |
(certificate (<CERTIFICATE>)))) |
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
| (server, server_raw) :: certs_and_raw -> | |
let now = Sys.time () in | |
let trusted = find_trusted_certs now in | |
let rec climb pathlen cert cert_raw = function | |
| (super, super_raw) :: certs -> | |
( match validate_relation pathlen super cert cert_raw with | |
| `Ok -> climb (succ pathlen) super super_raw certs | |
| err -> err ) |
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
{-# LANGUAGE FlexibleContexts, ScopedTypeVariables #-} | |
{-# LANGUAGE FlexibleInstances, OverlappingInstances, UndecidableInstances #-} | |
module GenS (AutoStorable) where | |
import Control.Applicative | |
import GHC.Generics | |
import Data.Word | |
import Foreign |
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
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} | |
{-# LANGUAGE OverlappingInstances, UndecidableInstances #-} | |
module Peek ( | |
module Data.Monoid | |
, Store, runStore, store, stores | |
, Restorable, restore | |
, AutoSize, autoSizeOf | |
) where |
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
#lang racket | |
;; | |
;; Run-of-the mill metacircular evaluator for (a small subset of) scheme. | |
;; Includes delimited continuations, and the tower of (positive) meta-levels. | |
;; | |
(struct closure [vars body environment]) | |
(struct primitive [procedure]) |
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
express = require \express | |
app = express! | |
..set \views, "#__dirname/../views" | |
..use express.static "#__dirname/../pub" | |
app.get '/', (req, res) -> | |
res.render 'index.jade' | |
app.listen 3001 |
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 <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <sys/time.h> | |
using namespace std; | |
typedef vector<int> vec; | |
typedef vector<int>::iterator ix; |
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
// nb. we have a typo with occurrences -- sometimes they are called "occurences". | |
var filter = {}; | |
var projection = { | |
_id : true, | |
facebook_occurence_ids : true | |
}; | |
db.movies.find(filter, projection) |