Skip to content

Instantly share code, notes, and snippets.

View francois2metz's full-sized avatar

François de Metz francois2metz

View GitHub Profile
@francois2metz
francois2metz / post.md
Created April 20, 2018 13:39
Rails release post with changelog

Hi everyone,

I am happy to announce that Rails 5.1.6 has been released.

CHANGES since 5.1.5

Changes in Active Support

  • Return all mappings for a timezone identifier in country_zones
@francois2metz
francois2metz / .zshrc
Created October 27, 2017 17:05
My docker config
# Docker and ruby stuff
alias docker-ruby='docker run --rm -ti -v $(pwd):/code -w /code -e BUNDLE_APP_CONFIG=/code/.bundle ruby:2.4'
# node stuff
alias docker-node='docker run --rm -ti -v $(pwd):/code -w /code node:8'
# elixir
alias docker-elixir='docker run --rm -ti -v $(pwd):/code -w /code elixir:latest'
# golang
alias docker-golang='docker run --rm -ti -v $(pwd):/code -w /code golang:1.8.0'
# nginx
alias docker-nginx='docker run --rm -ti -p 8080:80 -v $(pwd):/usr/share/nginx/html:ro nginx'
(function($) {
$.tools = $.tools || {version: '2013-02-15'};
var tool = $.tools.expose = {
conf: {
maskId: 'exposeMask',
loadSpeed: 'slow',
closeSpeed: 'fast',
zIndex: 9998,
opacity: 0.8,
startOpacity: 0,
--- main.js 2013-09-01 20:41:15.706575531 +0200
+++ main.js 2013-09-01 20:40:42.162575694 +0200
@@ -12,19 +12,44 @@
var data = require("sdk/self").data;
var pageMod = require("sdk/page-mod");
var panel;
+
+var mediasSupported = ['mp3', 'mp4', 'mkv', 'pls', 'avi', 'webm', 'flv', 'wmv', 'asf', 'flac', 'mka', 'm4a', 'aac', 'ogg'];
+
exports.main = function() {
@francois2metz
francois2metz / BUGFIXING.md
Last active October 8, 2015 07:58 — forked from spolu/BUGFIXING.txt
Bug Fixing & Reviewing process

this process suppose all devs have push&pull access to all repositories

When you decide to start working on a bugfix:

  1. create a branch:

    git checkout master // to make sure you branch from master

    git checkout -b fixXXX

@francois2metz
francois2metz / source.rb
Created May 16, 2012 07:25
em-eventsource with the basic example of sinatra
require "em-eventsource"
EM.run do
source = EventMachine::EventSource.new("http://localhost:4567/stream", {}, {'Accept' => 'text/event-stream'})
source.open do
puts "opened"
end
source.error do |error|
@francois2metz
francois2metz / water.js
Created May 10, 2012 19:11
created by water, a live-coding editor (http://water.gabrielflor.it)
var chart = d3.select('svg');
//chart.append("circle")
// .attr('r', 100)
// .attr('cx', 100)
// .attr('cy', 100);
chart.append("line")
.attr('x1', 200)
@francois2metz
francois2metz / parisjs.coffee
Created April 23, 2012 11:21
A simple hubot script @parisjs special node
# This is a simple hubot script
#
module.exports = (robot) ->
robot.respond /do you love javascript\?/i, (msg) ->
msg.send "Yes! But I prefer coffee-script."
msg.finish()
robot.hear /javascript/i, (msg) ->
msg.send "Do you want to say: #{msg.message.text.replace(/javascript/g, 'coffee-script')}"
@francois2metz
francois2metz / downloader.js
Created April 19, 2012 08:50
Download and write to file with node
#!/usr/bin/env node
// modify here
var downloadURL = "http://nodejs.org/dist/v0.6.15/node-v0.6.15.tar.gz"
var dest = "/tmp/result"
// require
var http = require('http')
var url = require('url')
var fs = require('fs')
@francois2metz
francois2metz / walk.sh
Created October 24, 2011 21:34
Create a screenshot of a website for each commits in a git repository
#!/usr/bin/env sh
# Under WTPL 2
# https://github.com/AdamN/python-webkit2png
COMMITS=$(git log --format="%H" --reverse)
OUTPUT_DIR="/tmp"
i=0
for commit in ${COMMITS}
do