- Save puma.rb file locally (eg. to ~/bin/puma.rb)
- Create alias
alias p='~/bin/puma.rbin bash.rc
Start server
| . |
| # Add capybara-webkit to Gemfile in :test group | |
| # https://github.com/thoughtbot/capybara-webkit#usage | |
| bundle install | |
| # If bundle install fails, manual install | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| # Install liborc (version required by Qt) | |
| # http://forums.debian.net/viewtopic.php?f=6&t=117769 |
| #!/bin/bash | |
| STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$") | |
| if [ "$STAGED_FILES" = "" ]; then | |
| exit 0 | |
| fi | |
| PASS=true |
| # Remove single quote and space in file names | |
| for f in *\'*; do mv "$f" "${f//\'/_}"; done | |
| for f in *\ *; do mv "$f" "${f//\ /_}"; done | |
| # Convert to PDF | |
| echo *.eps | xargs -n1 pstopdf | |
| # Move files to pdf folder | |
| cd ../pdf/ | |
| mv $(echo ../eps/*.pdf) . |
| function parse_git_dirty { | |
| [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working tree clean" ]] && echo "*" | |
| } | |
| function parse_git_stash { | |
| [[ $(git stash list 2> /dev/null | tail -n1) != "" ]] && echo "^" | |
| } | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)$(parse_git_stash)/" | |
| } | |
| PS1='\[\e[0;33m\]${HOSTNAME}\[\e[m\] \W \[\e[0;36m\]$(parse_git_branch)\[\e[m\] $ ' |
| const redux = require('redux'); | |
| const createStore = redux.createStore; | |
| const initialState = { | |
| counter: 0, | |
| }; | |
| // Reducer |
| [ | |
| { | |
| "key": "cmd+0", | |
| "command": "workbench.action.openLastEditorInGroup" | |
| }, | |
| { | |
| "key": "cmd+1", | |
| "command": "workbench.action.openEditorAtIndex1" | |
| }, | |
| { |
| (function() { | |
| const getLastName = guest => { | |
| const title = guest.querySelector('.title-nom-prenom'); | |
| const names = title.textContent.split(' '); | |
| return names[names.length - 1]; | |
| } | |
| const isotope = document.querySelector('#isotope-list-invites'); | |
| const guests = Array.prototype.slice.call(isotope.querySelectorAll('a')); | |
| guests.sort((a, b) => { | |
| const aLastName = getLastName(a); |
| # Install nginx with brew | |
| brew install nginx | |
| # Install PIP | |
| wget https://bootstrap.pypa.io/get-pip.py | |
| python get-pip.py | |
| # Get letsencrypt | |
| git clone https://github.com/letsencrypt/letsencrypt | |
| cd letsencrypt |