Skip to content

Instantly share code, notes, and snippets.

Pierre Mage PierreMage

  • London
Block or report user

Report or block PierreMage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
PierreMage / .aliases
Last active Sep 6, 2019
bare dotfiles
View .aliases
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ~='cd ~'
alias -- -='cd -'
PierreMage / SessionsStatsJob.scala
Last active Feb 22, 2016
Testing Scalding type-safe API
View SessionsStatsJob.scala
class SessionsStatsJob(args: Args) extends Job(args) {
import ExternalOperations._
import SessionsStatsJob._
val maxIdleTimeInMillis = args.getOrElse("maxIdleTimeInMillis", "100").toInt
val input = args("input")
val output = args("output")
val events = TypedPipe.from(TypedCsv[(Int, Int, String, String)](input))
PierreMage / Thaasophobia.scala
Last active Feb 10, 2016
Handling an actor's idleness in Akka
View Thaasophobia.scala
import scala.concurrent.duration._
* <p>Thaasophobia is a fear of being idle, sitting.
* <p>WARNING: A thaasophobic actor with default behaviour could stop before
* concurrent operations complete:
* <ul>
* <li>Don't use future callbacks inside the actor
PierreMage / Dockerfile
Created Sep 14, 2015
View Dockerfile
FROM java:8
RUN javac
PierreMage / PowerShell-profile.ps1
Last active Mar 10, 2020
Make your Windows command line better with doskey
View PowerShell-profile.ps1
# F7 = history
# Alt+F7 = history -c
# F8 = Ctrl+R
Set-Location C:
# Easier navigation
Set-Alias o start
function oo {start .}
find . -type f -mtime -2 -exec ls -ltrh "{}" ";"
import static java.lang.Math.*;
//TODO: use BigInteger instead of long
public class Factorial {
public long recursiveFactorial(long n) {
if (n == 0) {
return 1;
return n * recursiveFactorial(n - 1);
You can’t perform that action at this time.