Skip to content

Instantly share code, notes, and snippets.

@BalaSubrahmanyamD-RT
BalaSubrahmanyamD-RT / http_headers_security.htaccess
Created October 26, 2022 16:12 — forked from dkvadratu/http_headers_security.htaccess
{HTACCESS} HTTP headers for security in .htaccess file
# Check your website headers here: https://www.serpworx.com/check-security-headers/ or https://gf.dev/
# This configuration works for WP, WC on LiteSpeed server. Be careful. Test site after installing. All lines are explained are in serpworx.com tester.
# More docs:
# https://www.netsparker.com/whitepaper-http-security-headers/#XFrameOptionsHTTPHeader
# https://owasp.org/www-project-secure-headers/
# https://www.keycdn.com/blog/http-security-headers
# WordPress plugin for Headers setup https://wordpress.org/plugins/http-headers/
# Main security options in .htaccess file:
<?php
// Create a product:
$productData = array(
'product' => array(
'title' => "Shopify Logo T-Shirt",
'price' => 19.99));
$shopifyResponse = performShopifyRequest(
$shop, $accessToken, 'products', $productData, 'POST'
@BalaSubrahmanyamD-RT
BalaSubrahmanyamD-RT / php-style-guide.md
Created May 18, 2022 09:25 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.

PHP Style Guide

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:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
# CodeIgniter Subfolder .Htaccess
# today hints by www.insanen.com
Options +FollowSymLinks
RewriteEngine On
# Please do-not forget to change RewriteBase /YOUR-SUBFOLDER HERE
RewriteBase /YOUR-SUBFOLDER
RewriteRule ^$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
let gulp = require('gulp'),
replace = require('gulp-batch-replace'),
filesExist = require('files-exist');
gulp.task('bt4', () =>
{
let diff = {
'@media (min-width: $screen-xs-min) and (max-width: $screen-sm-max)': '@media (min-width: map-get($grid-breakpoints, xs)) and (max-width: map-get($grid-breakpoints, xs))',
'@media (min-width: $screen-xs) and (max-width: ($screen-md-min - 1))': '@media (min-width: map-get($grid-breakpoints, xs)) and (max-width: map-get($grid-breakpoints, md)-1)',