Skip to content

Instantly share code, notes, and snippets.

View mremond's full-sized avatar

Mickaël Rémond mremond

View GitHub Profile
@mremond
mremond / Spark+ipython_on_MacOS.md
Created November 12, 2016 16:27 — forked from ololobus/Spark+ipython_on_MacOS.md
Apache Spark installation + ipython notebook integration guide for Mac OS X

Apache Spark installation + ipython notebook integration guide for Mac OS X

Tested with Apache Spark 1.3.1, Python 2.7.9 and Java 1.8.0_45 + workaround for Spark 1.4.x from @enahwe.

Install Java Development Kit

Download and install it from oracle.com

@mremond
mremond / gist:7999e211d56a735ae2fadbbb61192c94
Created October 23, 2016 17:29 — forked from dmitshur/gist:6927554
How to `go get` private repos using SSH key auth instead of password auth.
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
@mremond
mremond / phoenix showdown rackspace onmetal io.md
Created November 24, 2015 14:56 — forked from omnibs/phoenix showdown rackspace onmetal io.md
Phoenix Showdown Comparative Benchmarks @ Rackspace

Comparative Benchmark Numbers @ Rackspace

I've taken the benchmarks from Matthew Rothenberg's phoenix-showdown, updated Phoenix to 0.13.1 and ran the tests on the most powerful machines available at Rackspace.

Results

Framework Throughput (req/s) Latency (ms) Consistency (σ ms)
@mremond
mremond / channels.erl
Last active September 1, 2015 12:41 — forked from kachayev/channels.erl
Process communication programming
-module(channels).
-compile(export_all).
make() ->
Ref = make_ref(),
Pid = spawn(?MODULE, channel, [Ref]),
{channel, Pid, Ref}.
channel(Ref) ->
receive
@mremond
mremond / README
Last active May 4, 2020 16:57
Phoenix Elixir framework with ejabberd - Tutorial
Please read original blog post for reference:
http://blog.process-one.net/embedding-ejabberd-into-an-elixir-phoenix-web-application/
@mremond
mremond / rebar_config_script.erl
Last active August 29, 2015 14:14
Generate rebar.config file form rebar.config.script to debug it
1> {ok, Data} = file:script("rebar.config.script").
...
2> file:write_file("rebar.config", io_lib:fwrite("~p.\n", [Data])).
ok
#!/usr/bin/env python3
import http.client
import ssl
import urllib.parse
def boxcarpush():
# Prepare the notification parameters
params = urllib.parse.urlencode({
require 'openssl'
def gen_key(name)
key = OpenSSL::PKey::RSA.new 1048
file = File.new(name, "w")
file.write(key)
file.close
end
def get_key(name)
!/usr/bin/perl -w
require LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $boxcarurl = 'https://new.boxcar.io/api/notifications';
# Put your Boxcar token in this file:
my $accesstoken = `cat ~/.boxcartoken`;
chomp($accesstoken);
@mremond
mremond / boxcar_push.php
Created February 6, 2014 11:36
Send a Boxcar notification to your device in PHP
<?php
curl_setopt_array(
$chpush = curl_init(),
array(
CURLOPT_URL => "https://new.boxcar.io/api/notifications",
CURLOPT_POSTFIELDS => array(
"user_credentials" => 'ACCESS_TOKEN',
"notification[title]" => 'message title',
"notification[long_message]" => '<b>Some text or HTML for the full layout page notification</b>',