Skip to content

Instantly share code, notes, and snippets.

View fsuuaas's full-sized avatar

Sharif Uddin Ahamed fsuuaas

View GitHub Profile
@fsuuaas
fsuuaas / disposable-email-provider-domains
Created August 30, 2021 02:57 — forked from lcherone/disposable-email-provider-domains
List of disposable email provider domains
0815.ru
0815.ru0clickemail.com
0815.ry
0815.su
0845.ru
0clickemail.com
0-mail.com
0wnd.net
0wnd.org
10mail.com
@fsuuaas
fsuuaas / countries.sql
Created July 26, 2021 12:21 — forked from ereli/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes. PostgreSQL compatible
CREATE SEQUENCE country_seq;
CREATE TABLE IF NOT EXISTS country (
id int NOT NULL DEFAULT NEXTVAL ('country_seq'),
iso char(2) NOT NULL,
name varchar(80) NOT NULL,
nicename varchar(80) NOT NULL,
iso3 char(3) DEFAULT NULL,
numcode smallint DEFAULT NULL,
phonecode int NOT NULL,
@fsuuaas
fsuuaas / Response.php
Created July 16, 2020 10:28 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
# Remove index.php from url Such as www.example.com/index.php/page to www.example.com/page
RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.$
RewriteRule ^index.php(.*)$ $1 [R=301,L]
I've displayed the the local time by saving the timezone in session variable with help of moment.js, here is the steps:
1 - use momentjs cdn (or with npm as you like)
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.19.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.13/moment-timezone-with-data.js"></script>
2 - In login.blade.php make a hidden input within login form
<input type="hidden" name="timezone" id="timezone">
and push this script
<label for="reference">Snapshot <span>*</span></label>
<div class="dropzone" id="myDropzone"></div>
<script>
Dropzone.autoDiscover = false;
modal = $("#successModal");
form = $("#imageUploadForm");
Dropzone.options.myDropzone= {
url: '/user/request-feature-save',
@fsuuaas
fsuuaas / Kernel.php
Created August 27, 2018 14:39 — forked from davidrushton/Kernel.php
Laravel 5 Database Queue - Shared Hosting
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
1 : Shutdown or Quit your XAMPP server from Xampp control panel.
2 : Download the ZIP version of MariaDB
3 : Rename the xampp/mysql folder to mysql_old.
4 : Unzip or Extract the contents of the MariaDB ZIP file into your XAMPP folder.
5 : Rename the MariaDB folder, called something like mariadb-5.5.37-win32, to mysql.
6 : Rename xampp/mysql/data to data_old.
7 : Copy the xampp/mysql_old/data folder to xampp/mysql/.
8 : Copy the xampp/mysql_old/backup folder to xampp/mysql/.
9 : Copy the xampp/mysql_old/scripts folder to xampp/mysql/.
Upgrade MariaDB for XAMPP
Download an installer of the latest stable version of MariaDB
Be sure all modules are stopped from the XAMPP Control Panel
Rename (xampp path)/mysql to something else (i.e. mysql-old)
Install the downloaded MariaDB to the (xampp path)/mysql
Copy the mysql-old/bin/my.ini file to mysql/bin directory
Copy all .ini and .bat files from mysql-old root to the mysql root
Copy the whole mysql-old/data/phpmyadmin directory to mysql/data
Copy the mysql-old/data/ibdata1 file to mysql/data
Backup
-----------------------------------------------------------------------------------------------------------------------------------
Step 1: Install & Activate plugins: https://wordpress.org/plugins/all-in-one-wp-migration/
Step 2: Go [All-in-One WP Migration > Backups > Create Backup] from Your Admin Menu
Step 3: If you want to change URL, like Live server to local server, Use "Find <text> Replace with <another-text> in the database"
Example: Live: http://boipoka.org ----> Local: http://localhost/boipoka
Step 4: Export to File
Step 5: Download
Restore