Skip to content

Instantly share code, notes, and snippets.

View ratulcse10's full-sized avatar

Abu Shahriar Ratul ratulcse10

View GitHub Profile
@ratulcse10
ratulcse10 / gist:e8c4895acaccd59e2c39
Created August 15, 2015 15:00
git pull issue solve
git reset --hard HEAD
git pull
@ratulcse10
ratulcse10 / email.txt
Created September 3, 2015 02:16
email id
Please send an email to [email protected] from yours
@ratulcse10
ratulcse10 / form.php
Last active September 4, 2015 21:35
form
<?php
echo "<h4 class='text-primary'>".$row['id'].". ".$row['ques']."</h4>";
echo "<div class='radio'>";
echo "<input type='radio' value='A' name='q".$row['id']."a'>".$row['opt1'].".<br>";
echo "<input type='radio' value='B' name='q".$row['id']."a'>".$row['opt2'].".<br>";
echo "<input type='radio' value='C' name='q".$row['id']."a'>".$row['opt3'].".<br>";
echo "<input type='radio' value='D' name='q".$row['id']."a'>".$row['opt4'].".<br>";
echo "</div>";
@ratulcse10
ratulcse10 / get_total univ
Created September 20, 2015 18:24
get_total univ
var i;
for (i = 27; i < 35; i++) {
var name = document.getElementsByClassName('wikitable sortable jquery-tablesorter')[0].getElementsByTagName("tbody")[0].getElementsByTagName('tr')[i].getElementsByTagName('td')[0].getElementsByTagName('a')[0].title;
console.log("<option>"+name+"</option>");
}
@ratulcse10
ratulcse10 / instruction.txt
Last active January 1, 2016 06:59
what need to do after fresh linux setup (developer version)
//Update linux distro
sudo apt-get update
//install lampp stack
follow this tutorial
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04
//install phpmyadmin
follow this tutorial
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-14-04
Task List:
1. Setup Laravel 4.2
2. Create a Migration for User Table
3. Create a Seeder for User Table
4. Create a Register Page (Name, Email, Password)
5. Create a Login Page (Email and Password)
@ratulcse10
ratulcse10 / code.php
Created November 17, 2015 15:49
copy file from another server php
<?php
$file = 'http://45.55.242.143/cse_carnival_2015.tar.gz';
$newfile = '/home/csecarnival/public_html/cse_carnival_2015.tar.gz';
if ( copy($file, $newfile) ) {
echo "Copy success!";
}else{
echo "Copy failed.";
}
@ratulcse10
ratulcse10 / way.txt
Created December 28, 2015 15:08
how to restore locked droplet
// Contact Support Ticke
1. Login to Web Console
* Link3 will not work, need to use Qubee
2. Backup MySQL
mysqldump -u username -p database_to_backup > backup_name.sql
3. Move that database file to /var/www/html
@ratulcse10
ratulcse10 / code.php
Created December 28, 2015 21:12
how to extract zip using php
<?php
$zip = new ZipArchive;
if ($zip->open('sedona.zip') === TRUE) {
$zip->extractTo('newcode');
$zip->close();
echo 'ok';
} else {
echo 'failed';
}
?>
@ratulcse10
ratulcse10 / gist:d3323d0f598743ed9929
Created January 5, 2016 14:03
how to install unibijoy in ubuntu
sudo apt-get install ibus-m17n m17n-db m17n-contrib ibus-gtk
sudo dpkg -L m17n-db|grep bn
sudo dpkg -L m17n-contrib|grep bn
If ibus is not installed on your system, install it by providing the following commands on terminal.
sudo apt-get install ibus