$ docker
| /** | |
| * First we will load all of this project's JavaScript dependencies which | |
| * includes Vue and other libraries. It is a great starting point when | |
| * building robust, powerful web applications using Vue and Laravel. | |
| */ | |
| require('./bootstrap'); | |
| window.Vue = require('vue'); |
| <?php | |
| /* | |
| * PDO DATABASE CLASS | |
| * Connects Database Using PDO | |
| * Creates Prepeared Statements | |
| * Binds params to values | |
| * Returns rows and results | |
| */ | |
| class Database { | |
| private $host = DB_HOST; |
| { | |
| "name": "webpack-sass", | |
| "version": "1.0.0", | |
| "scripts": { | |
| "start": "webpack-dev-server --open --mode development", | |
| "build": "webpack -p" | |
| }, | |
| "devDependencies": { | |
| "babel-core": "^6.26.0", | |
| "babel-loader": "^7.1.4", |
| /* file:///Users/henryhuman/Documents/04_Business/Bootstrap%20Creative/GitHub%20repositories/bootstrap-classes-list/bootstrap4.5.0.html */ | |
| .accordion | |
| .active | |
| .alert | |
| .alert-danger | |
| .alert-dark | |
| .alert-dismissible | |
| .alert-heading | |
| .alert-info |
I recently had the need to write a small url shortening application. I am aware that this problem has been solved quite a few times before, but what is being a developer if not reinventing the wheel just for the heck of it? Custom CMS anyone?
Knowing that this was going to be a tiny RESTful API and also knowing that Laravel 5.2 had API rate limiting built in, I was eager to give it a try. Taylor Otwell being Taylor Otwell shipped 5.2 with the rate limiting defaults set up out of the box and I had my application building out short url's in a matter of minutes. The problem for me came when I wanted to start associating those short urls with a user.
Typically my applications have a UI and authentication is done through a simple login page. Obviously for a RESTful API, having a login page isn't ideal. Instead, my hope was to have users append an api_token to the end of their query string and use that to auth
| //* Add language switcher polylang with slug inspite of names | |
| //* Position header-right | |
| add_action( 'genesis_header_right', 'custom_language_switcher'); | |
| function custom_language_switcher() { | |
| echo '<ul class="custom-lang-switcher">'; | |
| pll_the_languages(array('show_names'=>1,'display_names_as'=>'slug')); | |
| echo '</ul>'; | |
| } |
| # Install | |
| # via http://askubuntu.com/questions/510056/how-to-install-google-chrome | |
| wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
| sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
| sudo apt-get update | |
| sudo apt-get install google-chrome-stable | |
| # Update |