Skip to content

Instantly share code, notes, and snippets.


Juyal Ahmed tojibon

Block or report user

Report or block tojibon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tojibon / readme.MD
Last active May 27, 2019
My Laravel Best Practices
View readme.MD
  • Always follow PSR2 - PSR4 php coding style, better install it on PHPStorm
  • Always validate things via RequestValidators even if it is nullable(), Move validation from controllers to Request classes.
  • Use child relationships to get child data and filter data
  • Make sure if there is any auto generated codes like __construct
  • How can a array count ever be less than 0? Check to use a simple condition instead of making it complex with double check
  • Check if there is anything should actually fail if it doesn't have a set value
  • It's a good idea to check first for the less costly conditions (especially inside a loop)
  • Always use Carbon for date processing
  • Maintain code commenting and proper docblock
  • Always use custom env for static values, do not get data from the .env file directly
tojibon /
Last active May 12, 2019
Installing and Configuring ImageMagick on Xampp

#Steps to Install

  1. Download and Install ImageMagick
  2. Visit ImageMagic installation directory and module/coders copy all files and past on D:\xampp\apache\bin
  3. Download Binary php 5.6 TS one according to phpinfo Architecture if it is x86/x64
  4. Exatract and copy php_imagick.dll to D:\xampp\php\ext
  5. Add php_imagick.dll on php.ini
  6. Copy 8 CORE_*.dll to D:\xampp\apache\bin
  7. Restart Apache
  8. done and visit phpinfo
tojibon /
Last active May 9, 2019
Installing Croogo 3.0.0-alpha.3 with CakePHP 3.x
composer create-project croogo/app croogoapp 3.0.x-dev 
cd croogoapp
bin/cake Croogo/Install.install admin admin
bin/cake server

sudo chmod -R 0777 ./tmp/cache/queries/
sudo chmod -R 0777 ./tmp/cache/persistent/
tojibon /
Last active May 9, 2019
Search for a specific column name in all the tables in MySQL database?
    table_schema = 'DB_NAME' AND    
tojibon / composer.json
Last active May 8, 2019
Creating a package with Laravel 5.6 for a printing company ex: Alpha and the package name ex: Library.
View composer.json
"autoload": {
"classmap": [
"psr-4": {
"App\\": "app/",
"Alpha\\Library\\": "packages/Library/src/"
tojibon /
Created Sep 11, 2018
GIT Ignoring last few commits and roll back to existing target commit
git reset --hard 2467b9ebcc4f2487b4da5c9070e92913dc219842
git rebase -i master
git add .
git commit -m "reverted to 2467b9"
git push -f origin master
tojibon /
Created Aug 30, 2018
Multi Account Git
ssh-keygen -t rsa
ssh-add ~/.ssh/id_rsa

ssh-keygen -t rsa -C "companyName" -f "companyName"
ssh-add ~/.ssh/companyName
nano ~/.ssh/config
tojibon /
Created Apr 1, 2019 — forked from JamesMGreene/
A comparison of using `git flow` commands versus raw `git` commands.


gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

tojibon /
Last active Apr 27, 2019
Setting up VirtualHost for Symfony App in Ubuntu
sudo vim /etc/apache2/sites-available/symfony-test-app.conf
<VirtualHost *:80>
  <IfModule mod_rewrite.c>
    RewriteEngine on
tojibon / Application.js
Created Sep 29, 2016
Summernote image upload and save on server instead of base64 data saving on Database.
View Application.js
Application.prototype.initSummerNoteJS = function() {
var $this = this;
height: 300, //set editable area's height
onImageUpload: function(files, editor, $editable) {
You can’t perform that action at this time.