Skip to content

Instantly share code, notes, and snippets.

View Set wordpress post revisions.php
// limit post revision (wp-config)
define( 'WP_POST_REVISIONS', 3 );
// disable post revision
define('WP_POST_REVISIONS', false );
// delete revisions MySQL query
DELETE FROM wp_posts WHERE post_type = "revision";
View .htaccess-maintenance.conf
# redirect all users to maintenance page
RewriteCond %{REQUEST_URI} !^/maintenance.php$ [NC]
RewriteRule ^(.*)$ /maintenance.php [R=302,L]
Zillionx / .htaccess-https-301.conf
Last active Sep 13, 2019
.htaccess - HTTPS and www rewrite
View .htaccess-https-301.conf
RewriteEngine On
## https and www rewrite
# https to www.
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# https (no Cloudflare proxied)
RewriteCond %{HTTP:X-Forwarded-Proto} !https
View .htaccess-cache
# Enable and Disable Browser Caching with .htaccess
## Enable Examples
### 1 MONTH for static assets
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=2592000, public"
### 1 DAY for rss feeds and robots
View Bacon Ipsum.txt
Bacon ipsum sit amet duis occaecat et corned beef, fugiat pastrami velit magna shoulder ad short ribs in dolore incididunt ribeye. Flank velit short loin ea beef prosciutto, sint jerky ball tip spare ribs. Consectetur pancetta ex, venison frankfurter est qui nulla chuck flank boudin sausage esse magna andouille. Ex frankfurter cow strip steak ground round, incididunt hamburger ad reprehenderit esse.
Ullamco meatball salami, ut tail dolore sunt brisket veniam ex adipisicing. Dolore pariatur short ribs pancetta, exercitation andouille magna eiusmod tempor cillum. Ut bresaola pork belly, velit eiusmod meatloaf tongue chuck reprehenderit shankle. Pariatur frankfurter shankle, leberkas elit pastrami turkey. Irure eiusmod ullamco tenderloin. Esse duis frankfurter excepteur tenderloin ad incididunt pastrami magna dolore jowl, sausage pig ea tempor. Dolore hamburger nostrud cow in.
Prosciutto reprehenderit t-bone commodo ullamco ham. Dolore meatball biltong est esse ribeye, minim exercitation pastrami anim short lo
Zillionx / htaccess-cache
Last active May 31, 2018 — forked from Fayozjon/htaccess-cache-config
Enable and Disable Browser Caching with .htaccess
View htaccess-cache
# Enable and Disable Browser Caching with .htaccess
## Enable Examples
### 1 MONTH for static assets
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=2592000, public"
### 1 DAY for rss feeds and robots
Zillionx /
Created Mar 7, 2017
ChatScript topic example
topic: ~pets (dog cat pet animal bird fish snake)
?: ( << you like snake >>)
I love pythons except ^"Python" (the programming language)
?: ( << you ~like ~animals >>)
I love all animals.
t: Do you have any pets?
Zillionx / Select_ShowDiv.html
Last active Dec 2, 2015
Show Div when selectedIndex Property != 0
View Select_ShowDiv.html
<!doctype html>
<!-- -->
<meta charset="UTF-8">
<script type="text/javascript">
function ShowDiv() {
if (document.getElementById('Country').selectedIndex != 0 ) {
document.getElementById('Show').style.display = 'block';
Zillionx /
Last active May 22, 2016
Shrinking virtual disks on OSX VMWare fusion via CLI
# remove vm snapshots
# change your path /path_to_your/disc.vmdk
# source:
cd '/Applications/VMware'
# defrag
./vmware-vdiskmanager -d path_to_your/disc.vmdk
View Floating Cloud Background.markdown

Floating Cloud Background

A floating cloud background using CSS Transforms, negative animation delays, and a LESS loop for nth-child staggering.

A Pen by Shaw on CodePen.


You can’t perform that action at this time.