Skip to content

Instantly share code, notes, and snippets.

View Blaisorblade's full-sized avatar

Paolo G. Giarrusso Blaisorblade

View GitHub Profile
+++ b/src/library/scala/Enumeration.scala
+ @deprecated("Names should be specified individually or discovered via reflection", "2.10.0")
+ def this(initial: Int, names: String*) = {
+ @deprecated("Names should be specified individually or discovered via reflection", "2.10.0")
def this(names: String*) = this(0, names: _*)
+++ b/src/library/scala/Predef.scala
+ // @deprecated("Use scala.AnyRef instead", "2.10.0")
+ // def AnyRef = scala.AnyRef
object experiment {
import language.experimental.macros
import language.dynamics
import scala.reflect.macros._
case class Rep[+T](x:String)
implicit def anyToRep[T](x:T) = new Rep[T](x.toString)
@Blaisorblade
Blaisorblade / _readme.md
Created September 18, 2013 18:59 — forked from shime/_readme.md

Having trouble installing the latest stable version of tmux?

Save yourself some time and run this little fellow!

Prerequisities

  • gcc
  • wget
@Blaisorblade
Blaisorblade / LP.agda
Last active May 22, 2016 22:04 — forked from mietek/LP.agda
module LP where
open import Data.Empty using () renaming (⊥ to Empty)
open import Data.Product using (∃ ; _×_ ; _,_ ; proj₁ ; proj₂)
open import Data.Unit using () renaming (⊤ to Unit ; tt to unit)
open import Relation.Binary.PropositionalEquality as P -- using (_≡_ ; refl; cong₂; subst)
data Cx (X : Set) : Set where
∅ : Cx X
@Blaisorblade
Blaisorblade / EmacsKeyBinding.dict
Created January 15, 2018 15:10 — forked from jwreagor/EmacsKeyBinding.dict
Global Emacs Key Bindings for OS X
{
/* Keybindings for emacs emulation. Compiled by Jacob Rus.
*
* This is a pretty good set, especially considering that many emacs bindings
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and
* perhaps a few more, are already built into the system.
*
* BEWARE:
* This file uses the Option key as a meta key. This has the side-effect
* of overriding Mac OS keybindings for the option key, which generally
@Blaisorblade
Blaisorblade / GPG and git on macOS.md
Created February 25, 2018 23:44 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@Blaisorblade
Blaisorblade / Lib.hs
Last active April 13, 2019 11:27 — forked from mukeshtiwari/Lib.hs
{-# LANGUAGE CPP, MagicHash #-}
module Lib where
import qualified Prelude
#ifdef __GLASGOW_HASKELL__
import qualified GHC.Base
unsafeCoerce = GHC.Base.unsafeCoerce#
@Blaisorblade
Blaisorblade / ct.scala
Last active February 24, 2020 17:23 — forked from klauso/ct.scala
(Ported to Dotty 0.21.0-RC1)
//package test
import scala.language.higherKinds
object CT {
trait Category[Obj[_],C[_,_]] { // Obj is the value representation of objects, C the type representation of morphisms
def id[A:Obj]: C[A,A]
def compose[X:Obj,Y:Obj,Z:Obj](f: C[Y,Z], g: C[X,Y]): C[X,Z]
}
@Blaisorblade
Blaisorblade / ring2.v
Created April 1, 2020 21:45 — forked from vlj/ring2.v
From mathcomp Require Import ssreflect ssrnat eqtype ssrbool ssrnum ssralg.
Require Import Ring.
Open Scope ring_scope.
Import GRing.Theory.
Variable R: numFieldType.
Definition rt :
@Blaisorblade
Blaisorblade / ring3.v
Last active April 1, 2020 21:46 — forked from vlj/ring3.v
rom mathcomp Require Import ssreflect ssrnat eqtype ssrbool ssrnum ssralg.
Require Import Ring.
Import GRing.Theory.
Open Scope ring_scope.
Section foo.
Variable R: numFieldType.
Definition T:= R.