Skip to content

Instantly share code, notes, and snippets.

View cljoly's full-sized avatar
If I’m not answering within 7 days, please ping me again!

Clément Joly cljoly

If I’m not answering within 7 days, please ping me again!
View GitHub Profile
#!/usr/bin/env ocamlscript
Ocaml.packs := [ "lambdasoup" ]
--
(* This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
@cljoly
cljoly / liquid.theme
Last active February 6, 2016 14:23
Theme file to put liquid prompt in oh-my-zsh theme
# Theme file to use with oh-my-zsh, to get the liquid prompt as a theme.
# You need to place it in your theme/ directory, with the liquidprompt
# repository cloned in your plugin/ directory. Make sure to have it your plugin
# list (in zshrc)
# Only load Liquid Prompt in interactive shells, not from a script or from scp
[[ $- = *i* ]] && source ~/liquidprompt/liquidprompt
#!/usr/bin/env ocamlscript
Ocaml.packs := [ "str" ; "lambdasoup" ; "markup" ]
--
(*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
<!DOCTYPE HTML>
<html class="no-js" data-useragent="Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)" lang="en"> <head> <meta charset="utf-8"/> <meta content="width=device-width, initial-scale=1.0" name="viewport"/> <title>OcLaunch | <i class="fa fa-envelope-o"></i> Contact</title> <meta content="Contact the author, GPG key and that sort of stuff." name="description"/> <meta content="Leo Wzukw" name="author"/> <meta content="Leo Wzukw. Copyright (c)" name="copyright"/> <link href="http://oclaunch.eu.org/foundation.css" rel="stylesheet"/> </head> <body> <div class="row"> <div class="large-12 columns"> <div class="nav-bar left"> <ul class="button-group"> <li> <a class="button" href="http://oclaunch.eu.org/wiki/quick-start.html"> <i class="fa fa-download fa-lg"></i> <span class="show-for-large-up">Installation</span> </a> </li> <li> <a class="button" href="http://oclaunch.eu.org/blog"> <i class="fa fa-newspaper-o"></i> <span class="show-for-large-up">Blog</span> </a> </li> <li> <a class="button"
<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body {
@cljoly
cljoly / freenom.com.ddns.sh
Created March 3, 2016 19:15 — forked from a-c-t-i-n-i-u-m/freenom.com.ddns.sh
Dynamic DNS support shell script for freenom.com
#!/bin/bash
# settings
# Login information of freenom.com
freenom_email="main@address"
freenom_passwd="pswd"
# Open DNS management page in your browser.
# URL vs settings:
# https://my.freenom.com/clientarea.php?managedns={freenom_domain_name}&domainid={freenom_domain_id}
freenom_domain_name="domain.name"
@cljoly
cljoly / dns.md
Last active March 26, 2016 16:26
DNS servers

Some interesting DNS servers

For speed (in France)

From [here][1] and [here][2]

  • ns0.fdn.fr 80.67.169.12 or 2001:910:800::12

  • ns0.fdn.fr 80.67.169.40 or 2001:910:800::40

  • ns0.ldn-fai.net 80.67.188.188 or 2001:913::8

@cljoly
cljoly / golo.plugin.zsh
Created August 21, 2016 09:58 — forked from danielpetisme/golo.plugin.zsh
Golo ZSH integration It relies on the existing golo-bash-completion (it actyually sources it) Source of the idea: http://stackoverflow.com/a/8492043
###################################################################################
# Copyright 2012-2013 Institut National des Sciences Appliquées de Lyon (INSA-Lyon)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@cljoly
cljoly / IndexedPrivilege.md
Last active April 4, 2017 04:08 — forked from pthariensflame/IndexedPrivilege.md
An introduction to the indexed privilege monad in Haskell, Scala and C#.

The Indexed Privilege Monad in Haskell, Scala, and C# (and OCaml at some point?)

We've already looked at two different indexed monads in our tour so far, so let's go for a third whose regular counterpart isn't as well known: the privilege monad.

Motivation

The regular privilege monad allows you to express constraints on which operations a given component is allowed to perform. This lets the developers of seperate interacting components be statically assured that other components can't access their private state, and it gives you a compile-time guarantee that any code that doesn't have appropriate permissions cannot do things that would require those permissions. Unfortunately, you cannot easily, and sometimes cannot at all, build code in the privilege monad that gains or loses permissions as the code runs; in other words, you cannot (in general) raise or lower your own privilege level, not even w

keycode 94 = underscore Ecircumflex ecircumflex Ecircumflex slash brokenbar slash brokenbar ecircumflex Ecircumflex slash brokenbar ecircumflex Ecircumflex slash brokenbar