Skip to content

Instantly share code, notes, and snippets.

Keep smiling ;)

Abdul Hannan (Kamrul) k4mrul

Keep smiling ;)
View GitHub Profile
ayyybe / ccdl.command
Last active Oct 26, 2020
Adobe Offline Package Generator v0.1.2 (macOS only)
View ccdl.command
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
glof2 / spacepaper.pyw
Last active Jul 4, 2020
Sets your wallpaper to NASA's picture of the day
View spacepaper.pyw
import requests
from bs4 import BeautifulSoup
from os import path, getcwd
import ctypes
import time
def windowswallpaper(image):
ctypes.windll.user32.SystemParametersInfoW(SPI_SETDESKWALLPAPER, 0, image, 0)
huraji / php.ini
Last active Mar 11, 2020
Optimal php.ini configuration for Wordpress, see also
View php.ini
# Wordpress php.ini configuration
upload_max_filesize = 32M
post_max_size = 32M
memory_limit = 128M
max_execution_time = 60
max_input_vars = 10000
max_input_time = 30
chdsbd /
Created Sep 16, 2018
Disable Slack notifications for the weekend

Disable Slack notifications for the weekend

There isn't a way to configure DND for the weekend on Slack. However, you can use the /dnd 24 hours command to disable notifications for 24 hours using the [undocumented API][api] and [legacy tokens][token]. We're going to use the undocumented api and IFTTT to automate this.


  1. Generate a [token] for your account
  2. Navigate to your personal DM and copy the url (e.g. DAYM93S0N from
  3. Update the following url with your information (TOKEN looks like xoxp-4030334043-4959593942-3030320302032-sdf23rfasdf23rsf and CHANNEL looks like DAYM93S0N)
victorpetryk /
Last active Oct 7, 2020
MailHog installation on Ubuntu

Install & Configure MailHog

  1. Download and make it executable
sudo cp MailHog_linux_amd64 /usr/local/bin/mailhog
sudo chmod +x /usr/local/bin/mailhog
  1. Make MailHog as a service
from flask import Flask
from flask import request
import requests
from jaeger_client import Config
from flask_opentracing import FlaskTracer
import opentracing
app = Flask(__name__)
dusta /
Last active Oct 26, 2020 — forked from oodavid/
Deploy your site with git on cPanel

Deploy your site with git on cPanel

The most important: You must have shell access!

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
rbq / docker.yaml
Last active Oct 7, 2020
Install Docker CE on Ubuntu using Ansible
View docker.yaml
- hosts: all
- name: Install prerequisites for Docker repository
name: ['apt-transport-https', 'ca-certificates', 'curl', 'gnupg2', 'software-properties-common']
update_cache: yes
- name: Add Docker GPG key
apt_key: url=
akosveres / mariadb.yml
Last active Oct 28, 2020
Mariadb + phpmyadmin docker-compose
View mariadb.yml
version: "2"
image: mariadb
- ./database:/var/lib/mysql
lukecav / functions.php
Last active Oct 11, 2020 — forked from eteubert/wordpress-passwort-reset-unmultisite.php
WordPress Multisite: Password Reset on a Subsite.
View functions.php
* Password reset on sub site (1 of 4)
* Replace login page "Lost Password?" urls.
* @param string $lostpassword_url The URL for retrieving a lost password.
* @param string $redirect The path to redirect to.
* @return string
* @since 1.0.0
You can’t perform that action at this time.