JPG:
$ brew install jpegoptim
$ find . -name "*.jpg" -exec jpegoptim -m80 -o -p --strip-all {} \;
- PNG:
$ brew install optipng
$ find . -name "*.png" -exec optipng -o7 {} \;
import { cacheAdapterEnhancer } from 'axios-extensions' | |
import LRUCache from 'lru-cache' | |
const ONE_HOUR = 1000 * 60 * 60 | |
const defaultCache = new LRUCache({ maxAge: ONE_HOUR }) | |
export default function ({ $axios }) { | |
const defaults = $axios.defaults | |
// https://github.com/kuitos/axios-extensions | |
defaults.adapter = cacheAdapterEnhancer(defaults.adapter, { |
<?php | |
/** @constant string THEME_NAME **/ | |
define( 'THEME_NAME', get_option('stylesheet') ); | |
/** | |
* Custom script | |
*/ | |
function my_scripts_method() { | |
wp_enqueue_script( | |
'custom-script', |
$body-bg: red; | |
@mixin circleBorder($direction: left) { | |
&::before, | |
&::after { | |
content: ""; | |
width: 20px; | |
height: 20px; | |
position: absolute; | |
background: $body-bg; |
JPG:
$ brew install jpegoptim
$ find . -name "*.jpg" -exec jpegoptim -m80 -o -p --strip-all {} \;
- PNG:
$ brew install optipng
$ find . -name "*.png" -exec optipng -o7 {} \;
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
server { | |
index index.php; | |
set $basepath "/var/www"; | |
set $domain $host; | |
# check one name domain for simple application | |
if ($domain ~ "^(.[^.]*)\.dev$") { | |
set $domain $1; | |
set $rootpath "${domain}"; |
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.conf
to /usr/local/etc/nginx/
default.conf
and default-ssl.conf
to /usr/local/etc/nginx/sites-available
homebrew.mxcl.nginx.plist
to /Library/LaunchDaemons/
## Enable SSL in Apache (OSX) | |
The following will guide you through the process of enabling SSL on a Apache webserver | |
- The instructions have been verified with OSX El Capitan (10.11.2) running **Apache 2.4.16** | |
- The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "[Enable Apache HTTP server (OSX)](http://)" | |
#### Apache SSL Configuration | |
Create a directory within `/etc/apache2/` using **Terminal**.app: `sudo mkdir /etc/apache2/ssl` | |
Next, generate two host keys: |
const axios = require('axios') | |
const qs = require('querystring') | |
... | |
const requestBody = { | |
name: 'Akexorcist', | |
age: '28', | |
position: 'Android Developer', | |
description: 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/', |
/** | |
* Think of this "main.js" file as your application bootstrap. | |
*/ | |
import Vue from 'vue' | |
import Resource from 'vue-resource' | |
import VueRouter from 'vue-router' | |
import routes from './routes' | |
import middleware from './middleware' |