Skip to content

Instantly share code, notes, and snippets.

View clarus's full-sized avatar
🐻
☾λ

Guillaume Claret clarus

🐻
☾λ
View GitHub Profile
@clarus
clarus / Environment_mli.v
Created March 15, 2021 13:19
Environment_mli.v
(* Here is the current output (2021-03-15) of `coq-of-ocaml` on `environment.mli`: *)
Require Import CoqOfOCaml.CoqOfOCaml.
Require Import CoqOfOCaml.Settings.
Module Pervasives.
Parameter raise : forall {a : Set}, extensible_type -> a.
Parameter raise_notrace : forall {a : Set}, extensible_type -> a.
Parameter invalid_arg : forall {a : Set}, string -> a.
/* @flow */
type CookieEffect<A> = {
type: 'Read',
id: string,
ret: string => A
} | {
type: 'Write',
id: string,
value: string,
type Empty = 'empty type' & 'nothing there';
function unexpectedCase(impossible: Empty): void {
console.error(`Unexpected case ${impossible}`);
}
type t = 'a' | 'b';
// This function will type-check if and only if we handle all the cases.
function toNumber(value: t): number {

Dell XPS 13 Ubuntu

The setup of my Dell XPS 13 laptop with Ubuntu.

July 2016

Pixel density

My screen resolution is 1920x1080 for a 13.3″ screen. Thus I needed to increase the pixel density, else everything would be too small. I followed the advices on adapt-ubuntu-to-a-high-dpi-resolution-screen. I entered 1.38 for the system wide "Scale for menu and title bars" value. I entered 1.4 for the layout.css.devPixelsPerPx value in about:config for Firefox / Thunderbird. The case of the Atom editor was trickier. I ended up using the following option:

atom --force-device-scale-factor=1
@clarus
clarus / Dockerfile
Last active August 29, 2015 14:16
A Dockerfile for SSReflect.
# A Dockerfile for SSReflect.
# Put this file in a folder and run as root:
# docker build --tag=ssreflect .
# docker run -ti ssreflect
FROM ubuntu:14.10
MAINTAINER Guillaume Claret
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y gcc make git
@clarus
clarus / .bashrc
Last active November 20, 2015 19:06
My .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
<header class="navbar navbar-default navbar-static-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<%= link_to "sample app", root_path, id: "logo" %>
</div>
<!DOCTYPE html>
<html>
<head>
<title><%= full_title yield(:title) %></title>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
<%= csrf_meta_tags %>
<%= render 'layouts/shim' %>
</head>
<body>
@import "bootstrap";
html {
overflow-y: scroll;
}
.container {
max-width: 1000px;
}