Following line does't have /products.*
page. This tells Nginx to cache all product pages by default.
Idea is fast loading product pages will improve scalability of a store and also conversion.
<div id="map" style="width:70%;height:500px;"></div> | |
<h5>Tolarbag Mosque Road, Dhaka, Dhaka Division, Bangladesh</h5> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script> | |
var geocoder = new google.maps.Geocoder(); // initialize google map object | |
var address = "Tolarbag Mosque Road, Dhaka, Dhaka Division, Bangladesh"; | |
geocoder.geocode( { 'address': address}, function(results, status) { | |
if (status == google.maps.GeocoderStatus.OK) { |
// Remove Meta Generator: <meta name="generator" content="WordPress x.x" /> | |
// and <meta name="generator" content="WooCommerce x.x.x" /> | |
remove_action('wp_head', 'wp_generator'); | |
// Remove the EditURI/RSD | |
// Like: <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://localhost/wp/xmlrpc.php?rsd" /> | |
remove_action ('wp_head', 'rsd_link'); | |
// Remove it if you don't know what is Windows Live Writer | |
// <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://localhost/wp/wp-includes/wlwmanifest.xml" /> |
Following line does't have /products.*
page. This tells Nginx to cache all product pages by default.
Idea is fast loading product pages will improve scalability of a store and also conversion.
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
Translations: (No guarantee that the translations are up-to-date)
<?php | |
//Adding CSS inline style to an existing CSS stylesheet | |
function wpb_add_inline_css() { | |
//All the user input CSS settings as set in the plugin settings | |
$slicknav_custom_css = " | |
@media screen and (max-width: {$ng_slicknav_width}px) { | |
{$ng_slicknav_menu} { | |
display: none; |
# ---------------------------------- | |
# Colors | |
# ---------------------------------- | |
NOCOLOR='\033[0m' | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
ORANGE='\033[0;33m' | |
BLUE='\033[0;34m' | |
PURPLE='\033[0;35m' | |
CYAN='\033[0;36m' |
The following is from scotthelme.co.uk
with Content Security Policy (CSP) enabled(and a browser that supports it(http://caniuse.com/#feat=contentsecuritypolicy), you can tell the browser that it can only download content from the domains you explicitly allow http://www.html5rocks.com/en/tutorials/security/content-security-policy/ https://www.owasp.org/index.php/Content_Security_Policy I need to change our application code so we can increase security by disabling 'unsafe-inline' 'unsafe-eval'
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int
# Source: https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus/ | |
# DDOS characteristics: | |
# - traffic originates from a fixed set of IP addresses, much higher than requests from forward proxies | |
# - traffic is much higher than a human user can generate | |
# - The User-Agent header is sometimes set to a non-standard value | |
# - The Referer header is sometimes set to a value you can associate with the attack | |
# Limiting the rate of requests (example: 30 connection per minute per IP or allow request only every 2 seconds) | |
limit_req_zone $binary_remote_addr zone=one:10m rate=30r/m; |
# => YOURLS URL Shortener Configuration | |
location /u/ { | |
root /var/www/api/urls/; | |
rewrite ^/(.*)/$ /$1/index.php last; # Enables index functionality (only really used for /u/admin/) | |
rewrite ^/u/(.*)$ /$1 break; # Strips /u/ from the URI for static files | |
try_files $uri /u/yourls-loader.php$is_args$args; | |
# => API PHP-FPM | |
location ~ \.php$ { | |
fastcgi_split_path_info ^/u(.+?\.php)(.*)$; |