Skip to content

Instantly share code, notes, and snippets.

:octocat:
Finalizing

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
tojibon / readme.md
Last active Nov 29, 2018
Installing pgAdmin4 on Linux Ubuntu by Docker Container
View readme.md

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 Sep 17, 2018
Table of Paper Sizes From 4A0 to A10
View readme.md
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 Sep 11, 2018
GIT Ignoring last few commits and roll back to existing target commit
View readme.md
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 Aug 30, 2018
Multi Account Git
View readme.md
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 Apr 17, 2018
Downloading HTTP directory with all files and sub-directories
View readme.md
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)
View install_docker.sh
#!/bin/bash
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
apt-get update
apt-get install -y docker-engine
systemctl enable docker
usermod -aG docker ubuntu
curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.11.2/docker-compose-$(uname -s)-$(uname -m)"
chmod +x /usr/local/bin/docker-compose
docker-compose -v
@tojibon
tojibon / install.md
Created Jan 7, 2018
Install WordPress via WP-CLI
View install.md
# Download and Configure WordPress   
wp core download   
wp core config --dbhost=host.db --dbname=prefix_db --dbuser=username --dbpass=password   

# Configure wp-config.php   
chmod 644 wp-config.php   
wp core install --url=yourwebsite.com --title="Your Blog Title" --admin_name=wordpress_admin --admin_password=4Long&Strong1 --admin_email=you@example.com   

# Enable File Uploading   
@tojibon
tojibon / Gruntfile.js
Last active Dec 7, 2017
Starting a Grunt Project
View Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
// define a string to put between each file in the concatenated output
separator: ''
},
@tojibon
tojibon / readme.md
Last active Dec 6, 2017
Installing PrestaShop 1.7
View readme.md
git clone https://github.com/PrestaShop/PrestaShop.git mystore   
cd mystore   
composer install   
sudo nano /etc/php/7.0/apache2/php.ini   
#add extension=simplexml.so   
#add extension=zip.so   
sudo service apache2 restart   
sudo chown -R www-data:www-data ./   
sudo find ./ -type d -exec chmod 755  {} \;   
@tojibon
tojibon / ControllerTrait.php.md
Last active Nov 14, 2017
CakePHP 3.5.x vs Croogo 3.0.x Can't activate Croogo/Core theme fix
View ControllerTrait.php.md

Find Line Around - 51:

if (is_callable($callable)) {
    return call_user_func_array($callable, $request->params['pass']);
}

Replace:

if (is_callable($callable) && $request->params['action'] === 'activate' && is_array($request->params['pass'])) {
    return call_user_func_array($callable, [join('/',  $request->params['pass'])]);
You can’t perform that action at this time.