Final setup should consists of:
- NGINX (reverse proxy & static contents)
- Supports SSL (Let's Encrypt).
- Supports multiple domains, 1 IP.
- Apache 2.4 (Dynamic content: PHP)
- PHP 7.1
- MariaDB 10.1
Final setup should consists of:
All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Most sections are broken up into two parts:
Cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.
I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.
This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the awesome CSS extensions you've always wished you had:
| <?php | |
| // PHP memory limit for this site | |
| define( 'WP_MEMORY_LIMIT', '128M' ); | |
| // Explicitely setting url | |
| define( 'WP_HOME', 'http://domain.com' ); | |
| define( 'WP_SITEURL', 'http://domain.com' ); | |
| // Set url to... whatever. | |
| define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] ); |
| // ----------- | |
| // Debugger that shows view port size. Helps when making responsive designs. | |
| // ----------- | |
| function showViewPortSize(display) { | |
| if(display) { | |
| var height = jQuery(window).height(); | |
| var width = jQuery(window).width(); | |
| jQuery('body').prepend('<div id="viewportsize" style="z-index:9999;position:fixed;top:40px;left:5px;color:#fff;background:#000;padding:10px">Height: '+height+'<br>Width: '+width+'</div>'); | |
| jQuery(window).resize(function() { |
| exports.randeats = function(req, res){ | |
| var key = req.query.key; | |
| var location = encodeURIComponent(req.query.location); | |
| var radius = 16000; | |
| var sensor = false; | |
| var types = "restaurant"; | |
| var keyword = "fast"; | |
| var https = require('https'); | |
| var url = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?" + "key=" + key + "&location=" + location + "&radius=" + radius + "&sensor=" + sensor + "&types=" + types + "&keyword=" + keyword; |
| 1. Count social sharing from API |
| Hello! | |
| Basic installed stuff: | |
| - PHP (5.5.12) (see http://localhost/info.php) | |
| - Node (0.12.2) | |
| - MySql (5.5.41) | |
| - Phalcon (2.0.0) | |
| - PostgreSQL | |
| - Mongo | |
| - Android development environment (note that you cannot actually run android vm inside this vm, darn... I'll try to figure out this though) |