Skip to content

Instantly share code, notes, and snippets.

View ratulcse10's full-sized avatar

Abu Shahriar Ratul ratulcse10

View GitHub Profile
@ratulcse10
ratulcse10 / map.js
Created August 20, 2017 17:07
How to cast PHP Array to JS Array
<script>
var lan = <?php echo json_encode($user_data_lan); ?>;
var lon = <?php echo json_encode($user_data_lon); ?>;
</script>
@ratulcse10
ratulcse10 / mysql-docker.sh
Created August 14, 2017 10:27 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
<?php
//Set OnnoromSMS Login Details
$userNAME = "";
$userPASSWORD= "";
//Set Sending Mobile Number and Message
$msg = "";
$sendingMobile = ""; // example: 01911225298
@ratulcse10
ratulcse10 / .htaccess
Created May 9, 2017 07:32
redirect url
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) http://konnect.org.bd/public [R=301,L]
@ratulcse10
ratulcse10 / .htaccess
Created May 9, 2017 07:32
redirect url
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) http://konnect.org.bd/public [R=301,L]
@ratulcse10
ratulcse10 / steps.sh
Created April 5, 2017 21:57
how to clear /var/log ubuntu for low space warning
//check the list of files along with their sized
ls -lSh /var/log
//wipe the files
//**Remember don't delete any files
sudo su
>fileName
>exit
1. What is PHP ?
2. How to install PHP ?
3. PHP Syntax
4. PHP Variables
5. PHP Data Type
6. How to Print on PHP ?
7. PHP Contents
8. PHP Operators
9. PHP If, elseif, ,els
10. PHP Loops [for,while]
@ratulcse10
ratulcse10 / .htaccess
Created November 25, 2016 18:35
laravel index.php remove
DirectoryIndex index.php
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
@ratulcse10
ratulcse10 / cmd.sh
Created November 18, 2016 20:31
how to download full website skipping robot.txt
wget -r -p -e robots=off
@ratulcse10
ratulcse10 / cp.php
Created October 3, 2016 19:52
copy files from one folder to another
function full_copy( $source, $target ) {
if ( is_dir( $source ) ) {
@mkdir( $target );
$d = dir( $source );
while ( FALSE !== ( $entry = $d->read() ) ) {
if ( $entry == '.' || $entry == '..' ) {
continue;
}
$Entry = $source . '/' . $entry;
if ( is_dir( $Entry ) ) {