Skip to content

Instantly share code, notes, and snippets.

View aseigneurin's full-sized avatar

Alexis Seigneurin aseigneurin

View GitHub Profile
// http://www.cs.princeton.edu/~chazelle/courses/BIB/pagerank.htm
object MainIanRogers {
case class Edge(src: Int, dest: Int)
def main(args: Array[String]) {
val edges = Seq(
Edge(0, 1),
Edge(0, 2),
@aseigneurin
aseigneurin / README.md
Created November 25, 2015 22:03
Advice when preparing a VM
@aseigneurin
aseigneurin / Conway.scala
Created October 8, 2015 09:53
Conway's game of life in Scala
object Conway extends App {
var grid = Grid(3, 3)
while (true) {
grid.print
grid = grid.nextGrid
Thread.sleep(2000)
}

Keybase proof

I hereby claim:

  • I am aseigneurin on github.
  • I am aseigneurin (https://keybase.io/aseigneurin) on keybase.
  • I have a public key whose fingerprint is AA8A 7411 B99A 63A9 F826 782B CD55 E09D 9B12 8033

To claim this, I am signing this object:

%dep
z.load("com.datastax.spark:spark-cassandra-connector_2.10:1.2.1")
@aseigneurin
aseigneurin / À copier sur la clé USB
Last active August 29, 2015 14:18
Devoxx - Spark-Cassandra
- la VM
- projet Home-Spotify-Exo
- repository Maven (.m2)
- mv ~/.m2 ~/.m2.bak
- mvn dependency:resolve
- mvn dependency:sources
- zip -r ~/m2repo.zip ~/.m2
Et éventuellement :
@aseigneurin
aseigneurin / copy_remotely
Last active January 5, 2024 19:06
Ansible module to copy a file if the MD5 sum of the target is different
#!/usr/bin/python
DOCUMENTATION = '''
---
module: copy_remotely
short_description: Copies a file from the remote server to the remote server.
description:
- Copies a file but, unlike the M(file) module, the copy is performed on the
remote server.
The copy is only performed if the source and destination files are different
(different MD5 sums) or if the destination file does not exist.
@aseigneurin
aseigneurin / .bash_profile
Last active August 29, 2015 14:07
Bash profile
# Prompt
export PS1="\[\e[00;31;1m\]\t\[\e[0m\]\[\e[00;37m\] \[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# Aliases
alias ls='ls -GFh'
alias ll='ls -l'
alias lla='ls -la'
@aseigneurin
aseigneurin / Vagrantfile
Created June 5, 2014 14:36
Vagrantfile: Ubuntu + 7zip
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "saucy-server-amd64"
@aseigneurin
aseigneurin / A Tour of Go - Exercise: Equivalent Binary Trees.go
Last active August 29, 2015 14:00
A Tour of Go - Exercise: Rot13 Reader
package main
import (
"code.google.com/p/go-tour/tree"
"fmt"
)
// Walk walks the tree t sending all values
// from the tree to the channel ch.
func Walk(t *tree.Tree, ch chan int) {