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
#!/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 January 7, 2018 19:21
Install WordPress via WP-CLI
# 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 December 7, 2017 10:17
Starting a Grunt Project
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 December 6, 2017 07:47
Installing PrestaShop 1.7
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 November 14, 2017 20:18
CakePHP 3.5.x vs Croogo 3.0.x Can't activate Croogo/Core theme fix

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'])]);
@tojibon
tojibon / auto-login-from-reg-email.php
Created November 14, 2017 18:38 — forked from butlerblog/auto-login-from-reg-email.php
WordPress auto login from native registration email
<?php
/*
This code snippet can be added to your functions.php file (without the <?php)
to add a query string to the login link emailed to the user upon registration
which when clicked will validate the user, log them in, and direct them to
the home page.
*/
/**
* This first function is hooked to the 'user_register' action which fires
@tojibon
tojibon / envato-screenshots-downloader.php
Created November 14, 2017 18:37 — forked from hasinhayder/envato-screenshots-downloader.php
Download large preview images from the envato item's screenshots page
#!/usr/bin/env php
<?php
//usage: php envato-screenshots-downloader.php /path/to/save/screenshots http://url/to/screenshots/page
set_time_limit(0);
$dir = $argv[1];
$source = $argv[2];
print_r($argv);
mkdir ($dir);
$src = file_get_contents($source);
$pattern = '/src="(https:\/\/0.s3[a-zA-Z0-9_\-\.\/%]+)"/i';
@tojibon
tojibon / social-share.md
Created November 14, 2017 07:14
Social sharing infos
{
  facebook: {
    type: 'facebook',
    text: 'Facebook',
    icon: 'fa fa-facebook',
    color: '#3b5998',
    supportCount: true,
    shareUrl: 'https://www.facebook.com/sharer/sharer.php?u=',
    androidUrl: 'com.facebook.katana',
@tojibon
tojibon / readme.md
Created September 27, 2017 16:32
WordPress ubuntu plugin Installation failed: Could not create directory.

Open terminal and move to your WordPress root and execute below commands:

sudo chown -R www-data:www-data ./
sudo find ./ -type d -exec chmod 755  {} \;
sudo find ./ -type f -exec chmod 644  {} \;
@tojibon
tojibon / readme.md
Last active December 19, 2017 07:01
Get any kinds of Images from some awesome premium quality image sources

LIST OF FREE STOCK PHOTOS WEBSITES

https://pixabay.com/   
https://www.pexels.com/   
http://isorepublic.com/   
http://morguefile.com/   
https://unsplash.com/   
http://magdeleine.co/   
http://picography.co/   
http://www.fotor.com/