Skip to content

Instantly share code, notes, and snippets.

View mdsami's full-sized avatar
🏠
Work from Mars

MD SAMI mdsami

🏠
Work from Mars
View GitHub Profile
@mdsami
mdsami / Dept
Created January 3, 2020 07:01
Dept
static List<Map<String, dynamic>> departmentList = [
{"id": "depertment of bengali", "name": "Depertment of Bengali"},
{"id": "depertment of english", "name": "Depertment of English"},
{"id": "depertment of arabic", "name": "Depertment of Arabic"},
{
"id": "depertment of urdu and Persian Language",
"name": "Depertment of Urdu and Persian Language"
},
{
"id": "depertment of Pali and Sanskrit",
@mdsami
mdsami / pm2.json
Last active November 17, 2019 16:32
pm2
{
"apps": [
{
"exec_mode": "fork_mode",
"script": "./var/www/index.js",
"name": "Raj-API",
"node_args": [ "--harmony" ],
"env": {
"PORT": 4000,
@mdsami
mdsami / Deploy_on_cPanel.md
Created September 25, 2019 16:39 — forked from dusta/Deploy_on_cPanel.md
Deploy your site with git on cPanel

Deploy your site with git on cPanel

The most important: You must have shell access!

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
  • your (PHP) scripts are served from /var/www/html/
<?php
namespace App\Http\Controllers\api\v1;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
use App\Sendimg;
class APIController extends Controller
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
<name>dfs.name.dir</name>
<value>file:///home/hadoop/hdfs/namenode</value>
<name>dfs.data.dir</name>
<value>file:///home/hadoop/hdfs/datanode</value>
</property>
</configuration>
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/hadoop/hadooptmpdata</value>
</property>
</configuration>
@mdsami
mdsami / install.sh
Last active April 6, 2019 15:19 — forked from NLKNguyen/install.sh
Install Hadoop on Ubuntu 16.04
# Copy line by line and paste to an interactive shell
# Update system
sudo apt-get update && sudo apt-get dist-upgrade
# Download & Install Hadoop
wget http://apache.mirrors.tds.net/hadoop/common/hadoop-3.0.3/hadoop-3.0.3.tar.gz -P ~/Downloads
sudo tar zxvf ~/Downloads/hadoop-* -C /usr/local
@mdsami
mdsami / Laravel-carbon.blade.php
Last active May 19, 2023 09:02
Laravel-carbon AM , PM Date formate in blade
// 24 Hrs formate
<td> {{ Carbon\Carbon::parse($item->created_at)->format('d-M-Y G:ia') }}</td>
//Output
//20-Jan-2019 00:17:16 AM
// 12 Hrs formate
<td> {{ Carbon\Carbon::parse($item->created_at)->format('d-M-Y g:i:s A' ) }}</td>
@mdsami
mdsami / web.php
Last active February 11, 2019 04:13
Laravel Cache Route View cache Config cache Clear with Route
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="SoftBD">
<meta property="og:type" content="Website"/>