Skip to content

Instantly share code, notes, and snippets.


Juyal Ahmed tojibon

View GitHub Profile
tojibon /
Last active May 8, 2021
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 / IndexController.php
Last active Feb 18, 2021
Curl get request in Laravel controller with cache support.
View IndexController.php
namespace App\Http\Controllers;
class InfoController extends Controller
* Checking if cache file exist
* @ param string $name cache file name
tojibon /
Created Dec 15, 2016
Installing Spring STS or Eclipse IDE on Linux Mint 18 "Sarah"
  1. Download latests
  2. Rename the extracted bundle as "springsource"
  3. sudo mv springsource /opt
  4. sudo chown -R root:root /opt/springsource
  5. sudo chmod -R +r /opt/springsource
  6. sudo cp /opt/springsource/sts-3.8.2.RELEASE/icon.xpm /usr/share/pixmaps/sts.xpm [Your version can be different]
  7. sudo touch /usr/share/applications/sts.desktop<<EOF [Desktop Entry] Encoding=UTF-8 Name=Spring IDE
tojibon / GmailController.js
Last active Jan 13, 2021
OAuth2 google authentication and saving information on MongoDB database and later use the token / refreshtoken to retrieve profile information.
View GmailController.js
* Admin/GmailController
* @description :: Server-side logic for managing admin/gmails
* @help :: See!/documentation/concepts/Controllers
Help Links:
tojibon / app.js
Created Sep 11, 2015
Using DynamoDB with Node.js, Express.js
View app.js
var aws_router = require('./routes/aws');
app.use('/aws', aws_router);
//npm install aws-sdk
//visit http://localhost:3000/aws/table-list
tojibon /
Last active Mar 20, 2020 — forked from skynet/
Upgrade PHP to 7.3 on Amazon Linux (specifically for Elastic Beanstalk but should work elsewhere)
#!/usr/bin/env bash
# Upgrade an Amazon Linux EC2 to PHP 7.3
# Last tested w/ PHP 7.2 AWS Linux version 2.8.5
# Must be ran as sudo:
# sudo bash
# Can be added to ./.ebextensions/20_php.config like so:
# container_commands:
tojibon /
Last active Nov 20, 2019
Installing AWS KubeCTL on Windows
  1. Visit and install AWS CLI Client
  2. Visit and install Kubernetes CLI Client
  3. Configure AWS CLI - aws configure
Default region name [None]: eu-central-1
Default output format [None]: JSON
  1. Configure Amazon EKS (Elastic Kubernetes Service) - aws eks --region eu-central-1 update-kubeconfig --name phpfarmer-kube1
// Added in 5.1.11:
php artisan make:policy PostPolicy
// Displays help for a given command
php artisan --help OR -h
// Do not output any message
php artisan --quiet OR -q
// Display this application version
php artisan --version OR -V
// Do not ask any interactive question
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 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/