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
PierreMage / .aliases
Last active Sep 6, 2019
bare dotfiles
View .aliases
#!/bin/bash
#https://github.com/mathiasbynens/dotfiles/blob/master/.aliases
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ~='cd ~'
alias -- -='cd -'
@PierreMage
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
PierreMage / Thaasophobia.scala
Last active Feb 10, 2016
Handling an actor's idleness in Akka
View Thaasophobia.scala
package akka.actor
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
PierreMage / Dockerfile
Created Sep 14, 2015
boot2docker-jmxremote-example
View Dockerfile
FROM java:8
COPY Main.java /
RUN javac Main.java
@PierreMage
PierreMage / PowerShell-profile.ps1
Last active Mar 10, 2020
Make your Windows command line better with doskey
View PowerShell-profile.ps1
# http://technet.microsoft.com/en-us/library/ee692685.aspx
# F7 = history
# Alt+F7 = history -c
# F8 = Ctrl+R
Set-Location C:
# Easier navigation
Set-Alias o start
function oo {start .}
View findRecentLargeFiles.sh
# http://www.r00tb0x.com/content/find-recent-large-files-unix
find . -type f -mtime -2 -exec ls -ltrh "{}" ";"
View Factorial.java
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.