Skip to content

Instantly share code, notes, and snippets.

Avatar

François de Metz francois2metz

View GitHub Profile
@francois2metz
francois2metz / post.md
Created Apr 20, 2018
Rails release post with changelog
View post.md

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 Oct 27, 2017
My docker config
View .zshrc
# 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'
View toolbox.expose.js
(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,
View main.js
--- 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 Oct 8, 2015 — forked from spolu/BUGFIXING.txt
Bug Fixing & Reviewing process
View BUGFIXING.md

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
em-eventsource with the basic example of sinatra
View source.rb
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
created by water, a live-coding editor (http://water.gabrielflor.it)
View water.js
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 Apr 23, 2012
A simple hubot script @parisjs special node
View parisjs.coffee
# 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 Apr 19, 2012
Download and write to file with node
View downloader.js
#!/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 Oct 24, 2011
Create a screenshot of a website for each commits in a git repository
View walk.sh
#!/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
You can’t perform that action at this time.