Skip to content

Instantly share code, notes, and snippets.

View tojibon's full-sized avatar
:octocat:
Finalizing

Juyal Ahmed tojibon

:octocat:
Finalizing
View GitHub Profile
@tojibon
tojibon / bash.md
Created April 12, 2019 22:49
Installing symfony client
wget https://get.symfony.com/cli/installer -O - | bash
export PATH="$HOME/.symfony/bin:$PATH"
sudo mv /home/juyal/.symfony/bin/symfony /usr/local/bin/symfony
@tojibon
tojibon / Artisan.md
Last active January 10, 2024 08:07
Laravel CheatSheets based from - https://learninglaravel.net/cheatsheet/
// Added in 5.1.11:http://laravel.com/docs/5.1/authorization#creating-policies
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
tojibon / gitflow-breakdown.md
Created April 1, 2019 14:24 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

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
tojibon / mysql.bat
Created February 8, 2019 12:47
Connect MySQL + Create Database + Import SQL via terminal
mysql -u root -p
CREATE DATABASE phpapp_db;
CREATE USER 'phpapp_user'@'localhost' IDENTIFIED BY 'phpapp_user_pass';
GRANT ALL ON phpapp_db.* TO 'phpapp_user'@'localhost';
exit;
mysql -u phpapp_user -pphpapp_user_pass -D phpapp_db;
exit;
mysql -u phpapp_user -pphpapp_user_pass -D phpapp_db < dummy_data.sql;
FROM php:7.0.4-fpm
RUN apt-get update && apt-get install -y libmcrypt-dev \
mysql-client libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& docker-php-ext-install mcrypt pdo_mysql
@tojibon
tojibon / readme.md
Last active November 29, 2018 09:24
Installing pgAdmin4 on Linux Ubuntu by Docker Container

Without Persistent Data

docker pull dpage/pgadmin4
docker run -p 8082:80 \
-e "PGADMIN_DEFAULT_EMAIL=tojibon@gmail.com" \
-e "PGADMIN_DEFAULT_PASSWORD=pg" \
-d dpage/pgadmin4
docker ps
@tojibon
tojibon / readme.md
Last active September 17, 2018 20:12
Table of Paper Sizes From 4A0 to A10
Size Width x Height (mm) Width x Height (in)
4A0 1682 x 2378 mm 66.2 x 93.6 in
2A0 1189 x 1682 mm 46.8 x 66.2 in
A0 841 x 1189 mm 33.1 x 46.8 in
A1 594 x 841 mm 23.4 x 33.1 in
A2 420 x 594 mm 16.5 x 23.4 in
A3 297 x 420 mm 11.7 x 16.5 in
A4 210 x 297 mm 8.3 x 11.7 in
A5 148 x 210 mm 5.8 x 8.3 in
@tojibon
tojibon / readme.md
Created September 11, 2018 10:02
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
tojibon / readme.md
Created August 30, 2018 09:24
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
tojibon / readme.md
Last active April 17, 2018 10:28
Downloading HTTP directory with all files and sub-directories
wget -r -N -np -nH --cut-dirs=3 -R index.html http://hostname/aaa/bbb/ccc/ddd/

Explanation:

  1. It will download all files and subfolders in ddd directory:
  2. recursively (-r),
  3. not going to upper directories, like ccc/… (-np),
  4. not saving files to hostname folder (-nH),
  5. but to ddd by omitting first 3 folders aaa, bbb, ccc (--cut-dirs=3)