Skip to content

Instantly share code, notes, and snippets.

View fsuuaas's full-sized avatar

Sharif Uddin Ahamed fsuuaas

View GitHub Profile
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
//Clear Cache facade value:
Route::get('/clear-cache', function() {
$exitCode = Artisan::call('cache:clear');
return '<h1>Cache facade value cleared</h1>';
});
//Clear Route cache:
Route::get('/route-clear', function() {
$exitCode = Artisan::call('route:clear');
return '<h1>Route cache cleared</h1>';
Step 1: Upload Everything in public_html folder
Step 2: Create folder named 'application' in public_html folder
Step 3: Move every file & folder from public_html to application folder, Please don't move 'public' folder
Step 4: Move everything from 'public' to 'public_html'
Step 5: edit index.php file in 'public_html' like https://gist.github.com/fsuuaas/e6dc4e66667d863ead13b85efc3ccc21
Step 6: clear config, clear cache
Step 6: Check Storage folder is writable.
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
/*
@if(!is_null(session('flash_notification')))
@foreach ((array)session('flash_notification') as $message)
@php
$message = (array)$message[0];
@endphp
<script>
var Message = <?php echo json_encode($message); ?>;
toastr.options = {
"closeButton": true,
UPDATE table_name1
SET column1 = (
SELECT column2
FROM table_name2
WHERE table_name1.id = table_name2.id
);
@fsuuaas
fsuuaas / address.json
Created July 7, 2018 20:28 — forked from AminulBD/address.json
Bangladdesh divisions, districts and upazila list in php array and json
{
"Rajshahi": {
"Joypurhat": [
"Akkelpur",
"Joypurhat Sadar",
"Kalai",
"Khetlal",
"Panchbibi"
],
"Bogura": [
<?php if (!isset($_COOKIE['logoalert'])): ?>
<script>
$(window).on('load',function(){
$('#logoModel').modal('show');
setTimeout(function() {$('#logoModel').modal('hide');}, 10000);
});
</script>
<?php
document.onkeypress = function(e) {
if (123 == (e = e || window.event).keyCode) return !1
}, document.onmousedown = function(e) {
if (123 == (e = e || window.event).keyCode) return !1
}, document.onkeydown = function(e) {
if (123 == (e = e || window.event).keyCode) return !1
};
var message = "Sorry, right-click has been disabled";
function clickIE() {