Skip to content

Instantly share code, notes, and snippets.

View nremond's full-sized avatar

Nicolas Rémond nremond

View GitHub Profile
@staltz
staltz / introrx.md
Last active April 19, 2025 05:15
The introduction to Reactive Programming you've been missing
@agrlh
agrlh / install_netatalk_debian.md
Last active December 29, 2024 20:16
Compiling and installing netatalk 3.1.2 on Debian (used for my RaspberryPi TimeCapsule)

Building and setting up netatalk 3.1.2 on Debian

1. Build

Install dependencies

sudo apt-get install automake libtool build-essential pkg-config checkinstall git-core avahi-daemon libavahi-client-dev libssl-dev libdb5.1-dev db-util db5.1-util libgcrypt11 libgcrypt11-dev libcrack2-dev libpam0g-dev libdbus-1-dev libdbus-glib-1-dev libglib2.0-dev libwrap0-dev systemtap-sdt-dev libacl1-dev libldap2-dev

Download and unpack netatalk 3.1.2

@jrudolph
jrudolph / UpdateCopyrightHeaders.scala
Last active August 29, 2015 14:01
Simple script to update copyright headers
import java.io.{ FileOutputStream, File }
import scala.io.Source
import scala.util.matching.Regex
object UpdateCopyrightHeaders extends App {
val encoding = "utf-8"
val copyrightLines: Seq[String] = "Copyright (C) 1894-2014 Example Corp. <http://www.example.com>".split("\n")
val srcDir = new File("src/")
def updateCopyright(file: File): Unit = {
@debasishg
debasishg / gist:8172796
Last active April 20, 2025 12:45
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@vmarquez
vmarquez / TxMapTest.scala
Last active November 28, 2021 12:33
A mini STM if you will. I've made a'Transactional' map that mutates in a referentially transparent way.
import java.util.concurrent.atomic.AtomicReference
import java.util.concurrent.CountDownLatch
import scala.concurrent.Future
import scala.concurrent.ExecutionContext
import ExecutionContext.Implicits.global
object TxMapTest {
/*
* Example Usage
* We want to show two threads working with the same data source having both of their effects succeed
@dacr
dacr / gist:5437528
Created April 22, 2013 18:55
Play : Get ride of Thread.sleep to simulate remote processing
package controllers
import play.api._
import play.api.mvc._
import play.api.libs.concurrent.Execution.Implicits._
import play.api.libs.concurrent.Akka
import play.api.Play.current
import scala.concurrent._
import scala.concurrent.duration._
@dgageot
dgageot / SEOFilter.java
Created February 15, 2013 14:27
Jersey Filter *Prototype* that uses PhantomJS to retrieve pages asked by Googlebot. This way the javascript is interpreted by phantomjs and it provides a static webpage to Google.
package main;
import com.google.common.base.Strings;
import com.google.common.io.ByteStreams;
import com.sun.jersey.spi.container.ContainerRequest;
import com.sun.jersey.spi.container.ContainerResponse;
import com.sun.jersey.spi.container.ContainerResponseFilter;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
@dgageot
dgageot / CodeStoryStatusTest.java
Last active November 4, 2021 10:20
FluentLenium, PhantomJs, GhostDriver
package net.gageot;
import org.junit.Test;
import static org.fest.assertions.Assertions.assertThat;
public class CodeStoryStatusTest extends PhantomJsTest {
@Override
public String defaultUrl() {
return "http://status.code-story.net";
@spullara
spullara / App.java
Created January 6, 2013 20:48
JDK8 is going to be great. Webbit is also really nice (based on Netty).
package webserver;
import org.webbitserver.WebServers;
public class App {
public static void main(String[] args) {
WebServers.createWebServer(8080).add((req, res, con) -> {
res.content("Hello, world!").end();
}).start();
}
@mslinn
mslinn / PaypalController.scala
Last active June 9, 2017 22:22 — forked from alpeb/Paypal.scala
Paypal IPN script for Play 2.1
package controllers
import play.api._
import libs.ws.WS
import play.api.mvc._
import com.micronautics.paypal.{TransactionProcessor, PaypalTransactions}
import java.net.URLEncoder
import concurrent.{Await, ExecutionContext}
import concurrent.duration.Duration
import java.util.concurrent.TimeUnit