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 /
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

View app.dockerfile
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
apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
apt-add-repository 'deb 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 "$(uname -s)-$(uname -m)"
chmod +x /usr/local/bin/docker-compose
docker-compose -v
tojibon / auto-login-from-reg-email.php
Created Nov 14, 2017 — forked from butlerblog/auto-login-from-reg-email.php
WordPress auto login from native registration email
View auto-login-from-reg-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 / envato-screenshots-downloader.php
Created Nov 14, 2017 — forked from hasinhayder/envato-screenshots-downloader.php
Download large preview images from the envato item's screenshots page
View envato-screenshots-downloader.php
#!/usr/bin/env php
//usage: php envato-screenshots-downloader.php /path/to/save/screenshots http://url/to/screenshots/page
$dir = $argv[1];
$source = $argv[2];
mkdir ($dir);
$src = file_get_contents($source);
$pattern = '/src="(https:\/\/0.s3[a-zA-Z0-9_\-\.\/%]+)"/i';
tojibon / gist:27d5b82ed5d32100d18cbada0bf2e669
Created Aug 4, 2016 — forked from jcsrb/gist:1081548
get avatar from google profiles, facebook, gravatar, twitter, tumblr
View gist:27d5b82ed5d32100d18cbada0bf2e669
function get_avatar_from_service(service, userid, size) {
// this return the url that redirects to the according user image/avatar/profile picture
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px )
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word )
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word )
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px )
// everything else will go to the fallback
// google and gravatar scale the avatar to any site, others will guided to the next best version
tojibon / indexed.php
Created Jun 24, 2016 — forked from qsun/indexed.php
Check if URL is indexed by Google
View indexed.php
function indexed($url) {
$url = '' . urlencode($url);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Chrome 10');
tojibon / base64.js
Created May 19, 2016 — forked from jhurliman/base64.js
An extremely simple implementation of base64 encoding / decoding using node.js Buffers (plus url-safe versions)
View base64.js
* base64.js: An extremely simple implementation of base64 encoding / decoding using node.js Buffers
* (C) 2010, Nodejitsu Inc.
* (C) 2011, Cull TV, Inc.
var base64 = exports;
tojibon / 0_reuse_code.js
Created Apr 11, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
tojibon / dump.vim
Created Feb 18, 2016 — forked from mattn/dump.vim
View dump.vim
scriptencoding utf-8
let s:calendar_list = [
\ ['Australian Holidays', ''],
\ ['Austrian Holidays', ''],
\ ['Brazilian Holidays', ''],
\ ['Canadian Holidays', ''],
\ ['China Holidays', ''],
\ ['Christian Holidays', ''],
\ ['Danish Holidays', ''],
You can’t perform that action at this time.