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
sumonst21 / generate_resize_thumb.sh
Created Jul 20, 2020
Check if thumbnail exists else generate resized thumbnail from original image
View generate_resize_thumb.sh
#! /bin/bash
for filename in *.jpg; do
FILE="thumbnails/$filename"
if [ ! -f "$FILE" ]; then
echo "$FILE does not exist."
convert $filename -resize 90x140! "thumbnails/$filename"
echo "Thumb Generated!"
fi
done
@thomsh
thomsh / nginx-vod-module-install-debian-stretch.sh
Last active Sep 28, 2019
Rebuild nginx on Debian Stretch with Kaltura nginx-vod-module
View nginx-vod-module-install-debian-stretch.sh
#!/bin/bash
set -euxo pipefail
# Install latest Nginx from backports on Debian Stretch
# with nginx-vod-module from https://github.com/kaltura/nginx-vod-module
# 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 http://deb.debian.org/debian/ stretch-backports main contrib non-free' |tee /etc/apt/sources.list.d/bpo.list
fi
@sumonst21
sumonst21 / types-of-database-management-systems.md
Last active Feb 10, 2019
Types of Database Management Systems
View types-of-database-management-systems.md

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
geoffyuen / readme.md
Created Nov 22, 2018
Import CSV into ACF Repeater (Wordpress)
View readme.md
@ttk
ttk / cf-els-goaccess.sh
Created Sep 21, 2018
Exports the Cloudflare ELS log file and transforms the format to be consumed by goaccess
View cf-els-goaccess.sh
#!/bin/bash
# Purpose: Exports the Cloudflare ELS log file and transforms the format to be consumed by goaccess.
# Developed by Tom Kaminski <tom@mobilenations.com>
# Requires the following tools:
# wget
# jq - https://stedolan.github.io/jq/
# goaccess - https://goaccess.io/
@AnthumChris
AnthumChris / README.md
Last active Apr 22, 2020
Clear Nginx Cache
View README.md

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
1hakr / example.com
Last active Jul 27, 2020
Supercharge your NGIX config
View example.com
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;
server_name example.com;
location /api/ {
# Rate Limiting
limit_req zone=reqlimit burst=20; # Max burst of request
@yidas
yidas / codeiginter-server-config.md
Last active Jul 18, 2020
Codeigniter 3 server configuration for Nginx & Apache
View codeiginter-server-config.md

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
mrbar42 / README.md
Last active Jul 30, 2020
Secured HLS setup with Nginx as media server
View README.md

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
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 https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference.
* @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here.
*/
class Encryption {
You can’t perform that action at this time.