Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Md. Sumon Islam sumonst21

I may be slow to respond.
View GitHub Profile
sumonst21 /
Created Jul 20, 2020
Check if thumbnail exists else generate resized thumbnail from original image
#! /bin/bash
for filename in *.jpg; do
if [ ! -f "$FILE" ]; then
echo "$FILE does not exist."
convert $filename -resize 90x140! "thumbnails/$filename"
echo "Thumb Generated!"
thomsh /
Last active Sep 28, 2019
Rebuild nginx on Debian Stretch with Kaltura nginx-vod-module
set -euxo pipefail
# Install latest Nginx from backports on Debian Stretch
# with nginx-vod-module from
# This script/doc will rebuild the deb package
# Requirement : run on Debian Stretch with backports repository enabled
if ! egrep '^deb .+ stretch-backports' -- /etc/apt/sources.list /etc/apt/sources.list.d/*.list ; then
echo 'deb stretch-backports main contrib non-free' |tee /etc/apt/sources.list.d/bpo.list
sumonst21 /
Last active Feb 10, 2019
Types of Database Management Systems

Types of Database Management Systems

There are multiple types of database management systems such as relational, object, and document. In this article we discuss the types of Database Management Systems or DBMS.

Database Management Systems

A Database is a collection of records. Database management systems are designed as the means of managing all the records. Database Management is a software system that uses a standard method and running queries with some of them designed for the oversight and proper control of databases.

Types of Database Management Systems

There are four structural types of database management systems:

  • Hierarchical databases
geoffyuen /
Created Nov 22, 2018
Import CSV into ACF Repeater (Wordpress)
ttk /
Created Sep 21, 2018
Exports the Cloudflare ELS log file and transforms the format to be consumed by goaccess
# Purpose: Exports the Cloudflare ELS log file and transforms the format to be consumed by goaccess.
# Developed by Tom Kaminski <>
# Requires the following tools:
# wget
# jq -
# goaccess -
AnthumChris /
Last active Apr 22, 2020
Clear Nginx Cache

Clearing Nginx's HTTP Cache

I recently implemented Nginx HTTP content caching on our WordPress web servers to improve page load speeds and eliminate redundant, unneeded server-side page rendering. Caching the pages was relatively straightforward, but clearing the cache required a custom workaround.

Nginx comes in two versions: free and “Nginx Plus” at $2,500/year. The free version of Nginx does not offer the needed cache-clearing features of Nginx Plus, and I wasn’t comfortable paying $20,000 for 8 instances without trying to build my own solution.

Our Nginx servers run as an HTTP proxy for multiple PHP/MySQL-backed WordPress sites. The goal was to cache the dynamic PHP HTML responses in Nginx and serve the HTML pages from Nginx to avoid redundant, CPU-intensive PHP renders.

Site Cache Configuration

The example below shows how PHP response caching is configured for a site (other nginx configuration details are excluded for brevity). A cache named cachedemo-prod is defined to store cached HTML f

1hakr /
Last active Jul 27, 2020
Supercharge your NGIX config
proxy_cache_path /tmp/cacheapi levels=1:2 keys_zone=microcacheapi:100m max_size=1g inactive=1d use_temp_path=off;
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl http2 default_server;
location /api/ {
# Rate Limiting
limit_req zone=reqlimit burst=20; # Max burst of request
yidas /
Last active Jul 18, 2020
Codeigniter 3 server configuration for Nginx & Apache

Codeigniter 3 server configuration for Nginx & Apache

Web Server Site Configuration

Recommended Apache Configuration

Use the following configuration in Apache's httpd.conf file or within a virtual host configuration. Note that you should set DocumentRoot and ServerName fit to your environment:

mrbar42 /
Last active Jul 30, 2020
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
ve3 / Encryption.js
Last active Jul 7, 2020
Encrypt and decrypt between programming languages (PHP & JavaScript).
View Encryption.js
* Encryption class for encrypt/decrypt that works between programming languages.
* @author Vee Winch.
* @link Reference.
* @link crypto-js.js can be download from here.
class Encryption {
You can’t perform that action at this time.