Skip to content

Instantly share code, notes, and snippets.

View Merazsohel's full-sized avatar
🤲
Alhamdulillah For Everything

Md. Meraz Hossain Merazsohel

🤲
Alhamdulillah For Everything
  • Softzino Technologies
  • Dhaka
View GitHub Profile
@Merazsohel
Merazsohel / phpversion.sh
Created February 16, 2020 07:53
PHP 5.6 And PHP 7.2 Switch Command
read -p 'PHP version(5.6): ' input
if [ "$input" = "7.2" ]
then
echo 'Switching to PHP version 7.2'
sudo a2dismod php5.6
sudo a2enmod php7.2
sudo service apache2 restart
sudo update-alternatives --set php /usr/bin/php7.2
sudo update-alternatives --set phar /usr/bin/phar7.2
else
@Merazsohel
Merazsohel / gist:0fdb8a2462722a887645e8466f734dad
Created January 16, 2020 04:28
PHP 5.6 AND PHP 7.2 SWITCHING COMMAND
read -p 'PHP version(5.6): ' input
if [ "$input" = "7.2" ]
then
echo 'Switching to PHP version 7.2'
sudo a2dismod php5.6
sudo a2enmod php7.2
sudo service apache2 restart
sudo update-alternatives --set php /usr/bin/php7.2
sudo update-alternatives --set phar /usr/bin/phar7.2
else
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]
<?php
class BanglaConverter {
public static $bn = array("১", "২", "৩", "৪", "৫", "৬", "৭", "৮", "৯", "০");
public static $en = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0");
public static function bn2en($number) {
return str_replace(self::$bn, self::$en, $number);
}
public static function en2bn($number) {
if(navigator.userAgent.match(/MSIE 10/i) ||
navigator.userAgent.match(/Trident\/7\./) ||
navigator.userAgent.match(/Edge\/12\./)) {
$('body').on("mousewheel", function () {
event.preventDefault();
var wd = event.wheelDelta;
var csp = window.pageYOffset;
window.scrollTo(0, csp - wd);
});
}
@Merazsohel
Merazsohel / Laravel Cache Clear
Created September 10, 2018 15:55
Laravel Cache Clear
Route::get('artisan/command/{key?}', array(function($key = null)
{
Artisan::call('config:clear');
if($key == "cache-clear")
{
try
{
echo '<br>php artisan cache:clear...';
Artisan::call('cache:clear');
@Merazsohel
Merazsohel / Facebook page share html
Created May 14, 2018 08:19
Facebook page share html
<iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2Fappbajar&tabs=timeline&width=300&height=300&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true&appId=173994083221010" width="340" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
@Merazsohel
Merazsohel / Social share
Created February 27, 2018 08:39
Social share
<a href="https://www.facebook.com/sharer/sharer.php?u={{ urlencode(Request::fullUrl()) }}"
target="_blank">
Share on Facebook
</a>
<a href="https://twitter.com/intent/tweet?url={{ urlencode(Request::fullUrl()) }}"
target="_blank">
Share on Twitter
</a>
<a href="https://plus.google.com/share?url={{ urlencode(Request::fullUrl()) }}"
target="_blank">
@Merazsohel
Merazsohel / upazilla-bd-list
Created January 15, 2018 10:25
upazilla-bd-list
<div class="col-sm-3">
<select class="form-control">
<option>Choose One</option>
<option value="Akkelpur">Akkelpur</option>
<option value="Joypurhat Sadar">Joypurhat Sadar</option>
<option value="Kalai">Kalai</option>
<option value="Khetlal">Khetlal</option>
<option value="Panchbibi">Panchbibi</option>
<option value="Adamdighi">Adamdighi</option>
<option value="Bogra Sadar">Bogra Sadar</option>