This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Responsive Table</title> | |
<link rel="stylesheet" href="style.css" /> | |
<meta name="description" content="responsive table headers column" /> | |
<meta name="keywords" content="responsive, table, headers, column" /> | |
</head> | |
<body> | |
<h1>Responsive Table</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Build Time Ago PHP | |
* @param $dateTime format Y-m-d H:i;s | |
* @return $string | |
**/ | |
function timeAgo($dateTime) | |
{ | |
$etime = time() - strtotime($dateTime); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check if mobile=1 is set and set cookie 'mobile' equal to 1 | |
RewriteCond %{QUERY_STRING} (^|&)mobile=1(&|$) | |
RewriteRule ^ - [CO=mobile:1:%{HTTP_HOST}] | |
# Check if mobile=0 is set and set cookie 'mobile' equal to 0 | |
RewriteCond %{QUERY_STRING} (^|&)mobile=0(&|$) | |
RewriteRule ^ - [CO=mobile:0:%{HTTP_HOST}] | |
# cookie can't be set and read in the same request so check | |
RewriteCond %{QUERY_STRING} (^|&)mobile=0(&|$) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^m\. [NC] | |
#RewriteCond %{REQUEST_URI} !^/(media/) [NC] | |
RewriteCond %{HTTP_USER_AGENT} !(android|blackberry|googlebot-mobile|iemobile|iphone|ipod|opera\smobile|palmos|webos) [NC] | |
RewriteRule ^ http://www.juara.in%{REQUEST_URI} [L,R=302] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_deflate.c> | |
# Compress HTML, CSS, JavaScript, Text, XML and fonts | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf | |
AddOutputFilterByType DEFLATE application/x-font-truetype | |
AddOutputFilterByType DEFLATE application/x-font-ttf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## EXPIRES CACHING ## | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg "access plus 1 year" | |
ExpiresByType image/jpeg "access plus 1 year" | |
ExpiresByType image/gif "access plus 1 year" | |
ExpiresByType image/png "access plus 1 year" | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType application/font-woff "access plus 1 year" | |
ExpiresByType application/font-woff2 "access plus 1 year" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ifModule mod_gzip.c> | |
mod_gzip_on Yes | |
mod_gzip_dechunk Yes | |
mod_gzip_item_include file .(html?|txt|css|js|php|pl|woff2)$ | |
mod_gzip_item_include handler ^cgi-script$ | |
mod_gzip_item_include mime ^text/.* | |
mod_gzip_item_include mime ^application/x-javascript.* | |
mod_gzip_item_exclude mime ^image/.* | |
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* | |
</ifModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Add Trailing slash | |
RewriteCond %{REQUEST_URI} !(/$|\.) | |
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do the regex check against the URI here, if match, set the "require_auth" var | |
SetEnvIf Request_URI ^/admin require_auth=true | |
# Auth stuff | |
AuthUserFile /home/juarain/.htpasswds/admin/.htpasswd | |
AuthName "Password Protected" | |
AuthType Basic | |
# Setup a deny/allow | |
Order Deny,Allow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AuthName "Secure Area" | |
AuthType Basic | |
AuthUserFile /path/to/your/directory/.htpasswd | |
require valid-user |
OlderNewer