A Pen by Edward Lance Lorilla on CodePen.
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
| export const isSameURL = (a, b) => a.split('?')[0] === b.split('?')[0] | |
| export const isRelativeURL = u => | |
| u && u.length && /^\/[a-zA-Z0-9@\-%_~][/a-zA-Z0-9@\-%_~]*[?]?([^#]*)#?([^#]*)$/.test(u) | |
| export default function ({ app }) { | |
| const redirect = function (name, noRouter = false) { | |
| if (!this.options.redirect) { | |
| return | |
| } |
A Pen by Edward Lance Lorilla on CodePen.
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
| ########## Install NGINX ############## | |
| # Install software-properties-common package to give us add-apt-repository package | |
| sudo apt-get install -y software-properties-common | |
| # Install latest nginx version from community maintained ppa | |
| sudo add-apt-repository ppa:nginx/stable | |
| # Update packages after adding ppa |
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
| [ | |
| { "city": "Abbeville", "state": "Louisiana" }, | |
| { "city": "Aberdeen", "state": "Maryland" }, | |
| { "city": "Aberdeen", "state": "Mississippi" }, | |
| { "city": "Aberdeen", "state": "South Dakota" }, | |
| { "city": "Aberdeen", "state": "Washington" }, | |
| { "city": "Abilene", "state": "Texas" }, | |
| { "city": "Abilene", "state": "Kansas" }, | |
| { "city": "Abingdon", "state": "Virginia" }, | |
| { "city": "Abington", "state": "Massachusetts" }, |
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
| CREATE TABLE `countries` ( | |
| `country_code` varchar(2) NOT NULL default '', | |
| `country_enName` varchar(100) NOT NULL default '', | |
| `country_arName` varchar(100) NOT NULL default '', | |
| `country_enNationality` varchar(100) NOT NULL default '', | |
| `country_arNationality` varchar(100) NOT NULL default '', | |
| PRIMARY KEY (`country_code`) | |
| ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | |
| -- | |
| -- Dumping data for table `countries` |
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
| { | |
| "New York": [ | |
| "New York", | |
| "Buffalo", | |
| "Rochester", | |
| "Yonkers", | |
| "Syracuse", | |
| "Albany", | |
| "New Rochelle", | |
| "Mount Vernon", |
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
| FROM ubuntu:16.04 | |
| RUN PACKAGES="\ | |
| php-cli \ | |
| php-mysql \ | |
| php-intl \ | |
| php-xml \ | |
| php-curl \ | |
| php-dom \ | |
| " && \ |
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
| Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
| a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
| expire & throw a strange error. | |
| Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
| In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
| Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
| All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |
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
| #deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted | |
| # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
| # newer versions of the distribution. | |
| deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted | |
| deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted | |
| ## Major bug fix updates produced after the final release of the | |
| ## distribution. | |
| deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted |
NewerOlder