Ce document présente ce que propose la liste composée de Camille Appert et Michael Baudino pour Lyon.rb pour l'année 2013-2014.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Michael Baudino <[email protected]> | |
### License: WTFPL | |
### | |
### To use this fancy prompt: | |
### 1. copy this file as ~/.git-in-prompt.sh | |
### 2. add the following line to your ~/.bashrc file: | |
### [[ -s "$HOME/.git-in-prompt.sh" ]] && source "$HOME/.git-in-prompt.sh" | |
### 3. enjoy :-) | |
### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Functions to use bc from prompt | |
### paste this in your ~/.bashrc or ~/.bash_profile | |
### based on http://brettterpstra.com/2011/02/02/quick-calculations-in-bash/ | |
# Basic functions displaying result of operations | |
function calc() { # Default precision used is 2 | |
equat=$(echo ${@//[^-0-9\.\+\/\*\(\)]/ } | sed 's/[ \t]*//g') | |
echo -e "scale=2\n$equat\nquit\n" | bc -lq | |
} | |
function calc3() { # Default precision 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize Paymill public API key | |
window.PAYMILL_PUBLIC_KEY = '8a8394c13bb2c160013bb7f6af8a1c85' | |
# Retrieve Paymill javascript snippet (the "bridge") | |
$.getScript('https://bridge.paymill.com') | |
# This should be called when the user validates the HTML form | |
paymill.createToken | |
number: $('#card-number').val() # required, without spaces and hyphens | |
exp_month: $('#card-expiry-month').val() # required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//// | |
//// Foundation Variables | |
//// | |
//// The default font-size is set to 100% of the browser style sheet (usually 16px) | |
//// for compatibility with brower-based text zoom or user-set defaults. | |
$base-font-size: 100% !default | |
//// $base-line-height is 24px while $base-font-size is 16px | |
// $base-line-height: 150% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fr: | |
errors: | |
messages: | |
invalid_date: "n'est pas un objet Date valide" | |
invalid_time: "n'est pas un objet Time valide" | |
invalid_datetime: "n'est pas un objet DateTime valide" | |
is_at: "doit être %{restriction}" | |
before: "doit être avant %{restriction}" | |
on_or_before: "doit être le ou avant le %{restriction}" | |
after: "doit être après %{restriction}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file is just to have a nicely named Gist. Do not care about it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rails_version_matches?(requirement) | |
Gem::Requirement.new(requirement).satisfied_by? Gem::Version.new(::Rails::VERSION::STRING) | |
end | |
def rails_version_matches_any?(*requirements) | |
requirements.map{ |r| rails_version_matches?(r) }.reduce(:|) | |
end | |
def rails_version_matches_all?(*requirements) | |
requirements.map{ |r| rails_version_matches?(r) }.reduce(:&) |
I hereby claim:
- I am michaelbaudino on github.
- I am michaelbaudino (https://keybase.io/michaelbaudino) on keybase.
- I have a public key whose fingerprint is 8AD2 5BE0 7CC5 861E E6DF 222C B447 ACD3 845B D9F5
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DOCKER_SYNC_LOGFILE="/tmp/docker-sync.log" | |
DOCKER_SYNC_SCREEN_NAME="docker-sync" | |
function start_docker_sync_screen_session { | |
# We start `docker-sync start` twice because it often updates some images on first run and when it does, | |
# it exits successfully but asking for a `docker-sync clean` and then another `docker-sync start` run ¯\_(ツ)_/¯ | |
local cmd="docker-sync clean && docker-sync start && docker-sync clean && docker-sync start" | |
screen -d -m -S ${DOCKER_SYNC_SCREEN_NAME} script -F ${DOCKER_SYNC_LOGFILE} bash -c "${cmd}" |
OlderNewer