git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| ### Plugins | |
| Vetur | |
| ESlint | |
| Prettier | |
| Copy Relative Path | |
| Vue VSCode Snippets by Sarah.Drasner - Add in user settings "vetur.completion.userScaffoldSnippets":false | |
| Themes - Night Owl / FlatUI | |
| ### for nuxtjs install | |
| npm i -D eslint-plugin-prettier eslint-config-prettier |
| Following on from other Gists I have posted, this one shows a neat way of using Includes to centralise general blocking rules for Bad Bots, creepy crawlers and irritating IPs | |
| see the full post at http://www.blue-bag.com/blog/apache-better-blocking-common-rules |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| <!-- Month dropdown --> | |
| <select name="month" id="month" onchange="" size="1"> | |
| <option value="01">January</option> | |
| <option value="02">February</option> | |
| <option value="03">March</option> | |
| <option value="04">April</option> | |
| <option value="05">May</option> | |
| <option value="06">June</option> | |
| <option value="07">July</option> | |
| <option value="08">August</option> |
| [ | |
| "United States" => "us", | |
| "Afghanistan" => "af", | |
| "Albania" => "al", | |
| "Algeria" => "dz", | |
| "American Samoa" => "as", | |
| "Andorra" => "ad", | |
| "Angola" => "ad", | |
| "Anguilla" => "ai", | |
| "Antarctica" => "aq", |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var notify = require('gulp-notify'); | |
| var sass = require('gulp-ruby-sass'); | |
| var autoprefix = require('gulp-autoprefixer'); | |
| var minifyCSS = require('gulp-minify-css') | |
| var coffee = require('gulp-coffee'); | |
| var exec = require('child_process').exec; | |
| var sys = require('sys'); |
| "dependencies": { | |
| "angular": "~1.4.5", | |
| "angular-animate": "~1.4.5", | |
| "angular-ui-router": "~0.2.15", | |
| "animate.css": "~3.4.0", | |
| "bootstrap": "~3.3.5", | |
| "bootstrap-sass": "bootstrap-sass-official#~3.3.5", | |
| "font-awesome": "fontawesome#~4.4.0", | |
| "jquery": "~2.1.4" | |
| } |
| <?php | |
| $filename = "myscript.lock"; | |
| $lifelimit = 120; // in Second lifetime to prevent errors | |
| /* check lifetime of file if exist */ | |
| if(file_exists($filename)){ | |
| $lifetime = time() - filemtime($filename); | |
| }else{ | |
| $lifetime = 0; | |
| } | |
| /* check if file exist or if file is too old */ |
#Laravel 5 Simple ACL manager
Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.
If the user has a 'Root' role, then they can perform any actions.
Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php
| <?php | |
| /** | |
| * Set name field to slug on insert | |
| * | |
| * @param $name | |
| */ | |
| public function setNameAttribute($name) | |
| { | |
| $this->attributes['name'] = $name; |