Skip to content

Instantly share code, notes, and snippets.

View octplane's full-sized avatar
👨‍💻
I came here for the javascript jokes and was disappointed

Pierre Baillet octplane

👨‍💻
I came here for the javascript jokes and was disappointed
View GitHub Profile
@octplane
octplane / watcher.ss
Created May 20, 2020 21:02
kqueue watcher in gerbil scheme
#!/usr/bin/env gxi
(import
:std/format
:std/os/fcntl
:std/os/fdio
:std/os/fd)
(require bsd) (import :std/os/kqueue)
(define observed (make-hash-table-eqv))
@octplane
octplane / README.md
Last active July 25, 2018 22:25
Reese Tag-Sync
  • Reese kafka migration script
  • chef to shell converter for the VPC migration

Keybase proof

I hereby claim:

  • I am octplane on github.
  • I am octplane (https://keybase.io/octplane) on keybase.
  • I have a public key ASB90-lwKP27dmnZdSf26knDO6pom-7QnGIeih6a1K0zrwo

To claim this, I am signing this object:

@octplane
octplane / pixabay_client.rb
Created January 7, 2016 09:16 — forked from joost/pixabay_client.rb
Supersimple http://pixabay.com/api/docs/ Ruby API client.
require 'hashie'
require 'faraday'
require 'faraday_middleware'
# Supersimple http://pixabay.com/api/docs/ client.
# Usage:
# result = PixabayClient.new(key: 'your_key').get(search_term: 'beach')
# result.body # Mashified results
# See: https://gist.github.com/joost/e32daf904ed8bd171974
class PixabayClient
ADJECTIVE POS FREQ NEG FREQ TomDS
tout 0.64 0.36 0.2
petit 0.59 0.41 0.0
grand 0.75 0.25 0.2
seul 0.73 0.27 -0.2
autre 0.48 0.52 -0.1
même 0.47 0.53 0.0
bon 0.56 0.44 0.7
premier 0.51 0.49 0.5
beau 0.77 0.23 0.9
use std::io::Write;
use std::fs::OpenOptions;
use std::path::{ Path};
use std::thread;
fn main() {
let dst = Path::new("./test.txt");
let mut file = OpenOptions::new().write(true).create(true).open(dst).unwrap();
file.write_all(b"create").unwrap();
@octplane
octplane / lackr.md
Created June 2, 2014 07:59
Lackr Blog Article

Dress up your stack, add some Lackr to it

This article introduces Lackr, the core of our high speed http stack at Fotopedia.

Rest assured, lackr doesn't fork

Photo by Aurore D from Flickr

The need for Lackr emerged from the organic — but rational — way Fotonauts stack has evolved over a few years. This is the edifying tale of our long way towards modern architecture and good web performance.

@octplane
octplane / fwissr.md
Last active August 29, 2015 13:56 — forked from aymerick/fwissr.md

This article introduces Fwissr, the configuration registry tool that we use to centralize all our configurations.

centralize your configuration files

Photo by National Library of Norway

More than five years ago, when we started to build what became fotopedia, we had a main Rails application, a Merb application for user authentication and another Merb application for photo upload. These applications were deployed by Capistrano, and our servers were configured with Puppet with some scripts to glue everything together.

As the system evolved, we slowly got rid of many of these applications and started adding other components in the application stack. Puppet was replaced by [Chef](htt

diff --git a/src/vendor/angular/angular.js b/src/vendor/angular/angular.js
index d2115fe..e878eae 100644
--- a/src/vendor/angular/angular.js
+++ b/src/vendor/angular/angular.js
@@ -8779,6 +8779,9 @@ function $RootScopeProvider(){
logIdx, logMsg;
beginPhase('$digest');
+ var ccount = 0;
+ console.time("$digest");
@octplane
octplane / polycorn.md
Last active December 25, 2015 21:08
Life and Death of Unicorns The introduction of our Unicorn management tool, Polycorn. This gists contains the original article about Polycorn plus the source code of Polycorn.

Life and death of Unicorns

The introduction of our Unicorn management tool, Polycorn.

jump into our train!

Photo by Protohiro from Flickr

At Fotopedia, we use Unicorn to serve our main Rails application. Every day, we restart our application several times, spawning and killing hundred of Unicorns. Managing graceful restarts is a complex task, and requires careful monitoring and command. This article introduces our tool Polycorn, a Unicorn management program.

[[MORE]]