Skip to content

Instantly share code, notes, and snippets.

View syedanam's full-sized avatar

Syed Nasrul Islam Anam syedanam

View GitHub Profile
@syedanam
syedanam / 0_reuse_code.js
Created March 4, 2017 15:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@syedanam
syedanam / Carousel.html
Last active March 13, 2017 22:21
Bootstrap Carousel
<section>
<ul>
<li><div class="hexagon"></div></li>
<li><div class="hexagon"></div></li>
<li><div class="hexagon"></div></li>
</ul>
</section>
<section>
<ul>
<li><div class="hexagon"></div></li>
@syedanam
syedanam / Facade
Created November 10, 2017 17:41
Laravel Facade class
লারাভেল Facade কি? কিভাবে নিজস্ব Facade তৈরি করা যায়?
Written 2 days ago by Al Imran Ahmed on PHP
ভূমিকার আগে
আমি এই লিখায় লারাভেলের Facade কি এবং কিভাবে তার উত্তর দিতে চেষ্টা করব। তবে কেউ যদি জানতে চান Facade কেন তাহলে একটু কষ্ট করে লারাভেলের ডকুমেন্টেশনের Facade-সেকশনটা দেখে নিতে পারেন। যদি ডকুমেন্টেশনের কোন অংশ বুঝতে অসুবিধা হয় তাহলে নিঃসংকোচে আমাকে প্রশ্ন করতে পারেন। আমি আজকের লিখায় লারাভেল Facade কিভাবে কাজ করে? কিভাবে নিজের মত করে নিজের একটি Facade বানিয়ে ফেলা যায়? এই সব প্রশ্নের উত্তর দেওয়ার চেষ্টা করব এই লিখায়।
ভূমিকা
লারাভেলে কাজ করার শুরুর দিকে আমি Facade-কে ভাবতাম এমন একটা ক্লাস যার মধ্যে কতগুলো স্টেটিক ম্যাথড আছে। এর পিছনে কারণ হচ্ছে লারাভেল যারা শুরু করে তাদের কাছে লারাভেলের এপ্লিকেশনে ঢোকার রাস্তা(Entry point) হলো রুট(route.php বর্তমানে web.php, api.php ইত্যাদি) ফাইল। আর সেই রুট ফাইলে আমরা কোন রুট লিখি এভাবে :
Route::get('home', 'HomeController@show');
কেবল মাত্র প্রাথমিক অবজেক্ট অরিয়েন্টেড জ্ঞান সম্পন্ন যে কোন বিশ্বাবিদ্যালয় পড়ুয়া প্রোগ্রামার উপরের এই লাইনটা দেখে এটা ভাবাই স্বাভাবিক যে, নিশ্চ
Normal Class: A Java class
Java Beans:
All properties private (use getters/setters)
A public no-argument constructor
Implements Serializable.
Pojo: Plain Old Java Object is a Java object not bound by any restriction other than those forced by the Java Language Specification. I.e., a POJO should not have to
Extend prespecified classes
Implement prespecified interface
Contain prespecified annotations
Normal Class: A Java class
Java Beans:
All properties private (use getters/setters)
A public no-argument constructor
Implements Serializable.
Pojo: Plain Old Java Object is a Java object not bound by any restriction other than those forced by the Java Language Specification. I.e., a POJO should not have to
Extend prespecified classes
Implement prespecified interface
Contain prespecified annotations
@syedanam
syedanam / Sql_tuhin_suvra
Last active July 9, 2018 09:28
Sql Command In Linux
############################ backup full db ########################################
date;mysqldump -u root -p old_qmis > Documents/old_qmis.sql;date
######################### backup only database structure ##############################
mysqldump -u root -p --no-data qmis > Documents/qmis_structure.sql
@syedanam
syedanam / E: Unmet dependencies. Try using -f
Created November 27, 2017 04:56
E: Unmet dependencies. Try using -f
sudo apt --fix-broken install
sudo apt-get update
sudo apt-get upgrade
@syedanam
syedanam / mysql_in_ubuntu
Last active December 2, 2017 09:06
mysql error in ubuntu
/* mysql Said 1018 - Can't read dir of '.' (errno: 13 - Permission denied) */
chown -R mysql:mysql /var/lib/mysql/ #your mysql user may have different name
chmod -R 755 /var/lib/mysql/
/* 1006 - Can't create database 'test_DB' (errno: 15240960) in mysql */
sudo chown -R mysql:mysql /var/lib/mysql/
@syedanam
syedanam / lavravel_scrach
Created December 2, 2017 18:00
jefrry's way
https://github.com/ToTanbir/laravel-from-scratch