Skip to content

Instantly share code, notes, and snippets.

View shabbirbhimani's full-sized avatar
💭
:)

Shabbir Bhimani shabbirbhimani

💭
:)
View GitHub Profile
@shabbirbhimani
shabbirbhimani / hooks.html
Created October 11, 2017 12:34
The syntax for XenForo Hooks
<xen:hook name="HOOK_NAME">
ANY HTML CODE
</xen:hook>
<xen:hook name="HOOK_NAME" />
@shabbirbhimani
shabbirbhimani / .htaccess
Created November 20, 2017 13:15
Password Protect Dummy Directory
AuthType Basic
AuthName "XenForo Admin"
AuthUserFile "/home/********/.htpasswds/public_html/dummy/passwd"
require valid-user
@shabbirbhimani
shabbirbhimani / .htaccess
Created November 20, 2017 13:16
Password Protect admin.php file
<Files admin.php>
AuthType Basic
AuthName "XenForo Admin"
AuthUserFile "/home/********/.htpasswds/public_html/dummy/passwd"
require valid-user
</Files>
@shabbirbhimani
shabbirbhimani / .htaccess
Created November 20, 2017 13:18
IP Restriction for admin.php
<Files admin.php>
Order Deny,Allow
Deny from all
Allow from XX.XX.XX.XX
Allow from YY.YY.YY.YY
</Files>
@shabbirbhimani
shabbirbhimani / temp.php
Created December 3, 2017 09:50
Path to public_html
<?php
echo dirname(__FILLE__);
@shabbirbhimani
shabbirbhimani / .htaccess
Last active December 10, 2017 05:12
Redirect OLDDOMAIN to NEWDOMAIN
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^OLDDOMAIN\.com$ [NC]
RewriteRule ^(.*)$ http://NEWDOMAIN.com [R=301,L]
@shabbirbhimani
shabbirbhimani / .htaccess
Created December 23, 2017 14:43
htaccess Redirect HTTP to HTTPS using mod_rewrite
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
@shabbirbhimani
shabbirbhimani / .htaccess
Last active January 27, 2018 14:07
.htaccess code to Redirect Subdomain to Root Domain
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^SUB\.DOMAIN\.com$ [NC]
RewriteRule ^(.*)$ http://DOMAIN.com [R=301,L]
@shabbirbhimani
shabbirbhimani / shell-commands
Last active March 13, 2018 07:11
Python installation on Ubuntu
cd Downloads/
tar xf Python-3.6.4.tar.xz
cd Python-3.6.4
./configure
sudo make
sudo make install
@shabbirbhimani
shabbirbhimani / gist:5cbf9aaabac9841bd1ee95e8ad5c8441
Created March 24, 2018 04:48
Python - Read evaluate print loop
# reading a value
name = "Go4Expert"
# Using interpreter as a calculator, let's calculate 45 * 3456, just type that and press enter
45 * 3456
155520
# Now let's perform a division 12/6689906
12/6689906
1.7937471767166834e-06