Skip to content

Instantly share code, notes, and snippets.

View MasseGuillaume's full-sized avatar

Guillaume Massé (马赛卫) MasseGuillaume

  • narrative.io
  • Montréal, Québec, Canada
  • 13:08 (UTC -04:00)
View GitHub Profile
@MasseGuillaume
MasseGuillaume / a.scala
Created March 18, 2016 17:16
scalakata
import com.scalakata._
@instrument class Playground {
List(1,2,3).reverse
}
@MasseGuillaume
MasseGuillaume / wpa_supplicant.conf
Created July 21, 2015 21:07
udem wpa_supplicant.conf
network={
ssid="UdeM avec cryptage"
scan_ssid=1
key_mgmt=WPA-EAP NONE
pairwise=CCMP
group=CCMP TKIP
eap=TTLS PEAP TLS
identity="_____________@umontreal.ca" # << TODO
password="_____________" # << TODO
ca_cert="/etc/ssl/certs/ca-bundle.crt" # << TODO
HN: hyphothesis
AN: Axioms/Rules
H1: most minners uses top hardware 5 [TH/s] at 3600 [W] (best case)
source: https://en.bitcoin.it/wiki/Mining_hardware_comparison
H2: at ~5 [TH/s] it's expected to generate 0.05 [BTC/d]
source: https://alloscomp.com/bitcoin/calculator
A1: rule: 25 BTC/block
@MasseGuillaume
MasseGuillaume / bootstrap.sh
Last active August 29, 2015 14:22
Mediative Bootstrap
#!/bin/sh
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install caskroom/cask/brew-cask
brew tap caskroom/versions
brew cask install google-chrome
brew cask install sublime-text3
@MasseGuillaume
MasseGuillaume / PKGBUILD
Created March 25, 2015 20:49
apache-spark 1.3.0
# Maintainer: Franois Garillot ("huitseeker") <francois [at] garillot.net>
# Contributor: Christian Krause ("wookietreiber") <kizkizzbangbang@gmail.com>
pkgname=apache-spark
pkgver=1.3.0
pkgrel=3
pkgdesc="fast and general engine for large-scale data processing"
arch=('any')
url="http://spark.apache.org"
license=('APACHE')
import scalaz.Monoid
import scala.language.higherKinds
import scalaz.syntax.monoid._
import scalaz.std.set._
implicit def mm[K, T, M[_]](implicit mo: Monoid[M[T]]): Monoid[Map[K, M[T]]] = new Monoid[Map[K, M[T]]] {
def zero = Map.empty
def append(m1: Map[K, M[T]], m2: => Map[K, M[T]]) = {
val mMin = List(m1, m2).minBy(_.size)
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
@MasseGuillaume
MasseGuillaume / ttfi2.scala
Last active August 29, 2015 14:14
ttfi abstracted over Numeric
trait Repr[T]
trait ExpSym[Num, repr[_]] {
def lit: Num => repr[Num]
def neg: repr[Num] => repr[Num]
def add: repr[Num] => repr[Num] => repr[Num]
}
trait MulSym[Num, repr[_]] {
object TTFI {
import scala.language.higherKinds
object Initial {
// {{{ OOP
object OOP {
// extending language is easy, adding more functions is hard since it
// involves having to modify each case class
trait Exp[A] {
@MasseGuillaume
MasseGuillaume / xmonad.hs
Created November 3, 2014 03:27
My xmonad config
--
-- xmonad example config file for xmonad-0.9
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
--
-- NOTE: Those updating from earlier xmonad versions, who use
-- EwmhDesktops, safeSpawn, WindowGo, or the simple-status-bar