Skip to content

Instantly share code, notes, and snippets.

Zillionx

Block or report user

Report or block Zillionx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .htaccess-maintenance.conf
# redirect all users to maintenance page
RewriteCond %{REQUEST_URI} !^/maintenance.php$ [NC]
RewriteRule ^(.*)$ /maintenance.php [R=302,L]
@Zillionx
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"
</filesMatch>
### 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
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"
</filesMatch>
### 1 DAY for rss feeds and robots
@Zillionx
Zillionx / pets.top
Created Mar 7, 2017
ChatScript topic example
View pets.top
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
Zillionx / Select_ShowDiv.html
Last active Dec 2, 2015
Show Div when selectedIndex Property != 0
View Select_ShowDiv.html
<!doctype html>
<!-- http://www.w3schools.com/jsref/prop_select_selectedindex.asp -->
<html>
<head>
<meta charset="UTF-8">
<title>tst</title>
<script type="text/javascript">
function ShowDiv() {
if (document.getElementById('Country').selectedIndex != 0 ) {
document.getElementById('Show').style.display = 'block';
@Zillionx
Zillionx / Shrink_OSX_VirtualDisk.sh
Last active May 22, 2016
Shrinking virtual disks on OSX VMWare fusion via CLI
View Shrink_OSX_VirtualDisk.sh
#!/bin/sh
# remove vm snapshots
# change your path /path_to_your/disc.vmdk
#
# source: http://snipurl.com/maggini_vmdisc_osx
cd '/Applications/VMware Fusion.app/Contents/Library'
# 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.

License.

@Zillionx
Zillionx / makeUniqueString.php
Last active Oct 9, 2015
PHP - How to make a random unique string
View makeUniqueString.php
<?PHP
function makeUniqueString ($length=16) // $lenght - string lenght
{
$salt = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345678';
$len = strlen($salt);
$makepass = '';
mt_srand(10000000*(double)microtime());
for ($i = 0; $i < $length; $i++) {
$makepass .= $salt[mt_rand(0,$len - 1)];
}
You can’t perform that action at this time.