composer create-project --prefer-dist cakephp/app bookmarker
bin/cake server
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| " To get a list of Actions run `:actionlist ` | |
| " let mapleader = ',' | |
| " let mapleader = " " | |
| let mapleader = "\<SPACE>" | |
| set ignorecase smartcase | |
| set NERDTree | |
| set hlsearch | |
| set showmode | |
| set scrolloff=5 |
recorded January 5th, 2017
Topics
| #!/usr/local/bin/php | |
| <?php | |
| # PHP LINTING | |
| $output = array(); | |
| $return = 0; | |
| exec('git rev-parse --verify HEAD 2> /dev/null', $output, $return); | |
| $against = $return == 0 ? 'HEAD' : '4b825dc642cb6eb9a060e54bf8d69288fbee4904'; | |
| exec("git diff-index --diff-filter=ACMRTUXB --cached --name-only {$against}", $output); |
| #!/bin/sh | |
| # @source: https://gist.github.com/ronanguilloux/11f6a788358577474ab4 | |
| # @link http://tech.zumba.com/2014/04/14/control-code-quality/ | |
| PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
| STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
| # Determine if a file list is passed |
| SSH_FORWARD_PROMPT=true | |
| export PS1="\n[\[\e[32m\]\t\[\e[m\] \[\e[31m\]\u\[\e[m\]@\[\e[36m\]\H\[\e[m\]][\[\e[32m\]\$?\[\e[m\]]\[\e[33m\]\`/usr/sbin/getenforce\`\[\e[m\]\n\w:\!> " | |
| function ssh_forward_prompt() | |
| { | |
| env ssh -A "$@" -t "PS1='$PS1' bash -l" | |
| } | |
| if [ "$SSH_FORWARD_PROMPT" = true ] ; then |
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| use Illuminate\Http\Response; | |
| use Illuminate\Cache\RateLimiter; | |
| class ThrottleRequests | |
| { |
| # Good source for gitignore examples | |
| # https://github.com/github/gitignore | |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o |
| # To use: add a .redmine-url file in the base of your project | |
| # You can also set redmine_URL in your .zshrc or put .redmine-url in your home directory | |
| # .redmine-url in the current directory takes precedence | |
| # | |
| # If you use Rapid Board, set: | |
| #redmine_RAPID_BOARD="true" | |
| # in you .zshrc | |
| # | |
| # Setup: cd to/my/project | |
| # echo "https://name.redmine.com" >> .redmine-url |