Skip to content

Instantly share code, notes, and snippets.

View Shaz3e's full-sized avatar

Shahrukh A. Khan Shaz3e

View GitHub Profile
@Shaz3e
Shaz3e / AppServiceProvider.php
Last active July 14, 2024 21:06
Rate Limit in Laravel
<?php
namespace App\Providers;
use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
@Shaz3e
Shaz3e / readme.md
Last active November 2, 2023 13:19
How to Remove Foreign Key and Index from Database

instructions

  • Go to PHPMyAdmin
  • Select Database
  • Click Query Tab

Insert the following commands one by one make sure to change table_name with actual table name and column name with actual column name

First you need to remove foreign key from table.column

@Shaz3e
Shaz3e / WordPress Migration Update DB
Created October 29, 2023 21:22
After WordPress Migration you need to update wp.config.php and Database
#### Update the following commands in wp-config.php
```
define( 'WP_HOME', 'http://www.yoursitename.com' );
define( 'WP_SITEURL', 'http://www.yoursitename.com' );
```
#### PHPMyAdmin SQL Query
```
@Shaz3e
Shaz3e / Install Composer using MAMP's PHP.md
Created August 17, 2023 21:13 — forked from irazasyed/Install Composer using MAMP's PHP.md
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

@Shaz3e
Shaz3e / readme.md
Last active April 30, 2023 15:01
5 Commands to add an existing project to GitHub

Use the following command to initialize the repository

> git init

Use the following command to index repository

> git add .
@Shaz3e
Shaz3e / loader.css
Created August 29, 2021 19:32
Loading Effect
#overlay{
position:fixed;
z-index:99999;
top:0;
left:0;
bottom:0;
right:0;
background:rgba(255,255,255,1);
transition: 1s 0.4s;
}
@Shaz3e
Shaz3e / Remove Microsoft Word HTML tags
Created July 4, 2015 22:17
Remove Microsoft Word HTML tags
When used, Microsoft Word creates lots of tags: font, span, style, class… These tags are useful inside Word itself, but when you paste a text from Word into a webpage, you’ll end up with lots of useless tags. Here’s a very handy function to remove all Word HTML tags.
@Shaz3e
Shaz3e / scroller-bottom.js
Created March 22, 2016 20:18
Detect Bottom on Scroll
```
$(window).scroll(function(){
if($(window).scrollTop() + $(window).height() > $(document).height() - <?php echo( s3_option('s3cc_fixed_trigger') == '' ? 100 : s3_option('s3cc_fixed_trigger') );?>) {
$('.s3cc-fixed').css('position','static');
}else{
$('.s3cc-fixed').css('position','fixed');
}
});
```
@Shaz3e
Shaz3e / Help Complete Email Addresses with <datalist>
Created December 17, 2013 12:45
The character after @ in emails will trigger a dropdown of choices of popular email domains.
# Email Domain Datalist Helper
Shows a list of suggestions after you've hit the @.
<label for="email">Email</label>
<input id="email" name="email" type="email" placeholder="your@email.com">
<div class="s3-left-fixed">
<ul>
<li><a href="#1">First Page</a></li>
<li><a href="#2">Second Page</a></li>
<li><a href="#3">Third Page</a></li>
<li><a href="#4">Fourth Page</a></li>
<li><a href="#5">Fifth Page</a></li>
</ul>
</div>
<div class="s3-center">