This file contains hidden or 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 hidden or 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 hidden or 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 :-) | |
### |
NewerOlder