Skip to content

Instantly share code, notes, and snippets.

View sumonst21's full-sized avatar
🏠
Working from home

Md. Sumon Islam sumonst21

🏠
Working from home
View GitHub Profile
@sumonst21
sumonst21 / types-of-database-management-systems.md
Last active February 10, 2019 12:46
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
# Force download for certain URLs with ?force_download
set $forceDownload "";
set $filename "";
if ($request_filename ~ /([^/]+)$) {
set $filename $1;
}
if ($request_uri ~ [\?&]force_download(=(?<filename>[^&$]+)|&|$)) {
set $forceDownload "attachment; filename=\"$filename\"";
@thomsh
thomsh / nginx-vod-module-install-debian-stretch.sh
Last active September 28, 2019 02:39
Rebuild nginx on Debian Stretch with Kaltura nginx-vod-module
#!/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
@cdolek
cdolek / example.com.conf
Last active November 15, 2019 00:25
nginx config example for memcached, php fpm and wordpress
http {
# memcached servers, generated according to wp-ffpc config
upstream memcached-servers {
server 127.0.0.1:11211;
}
# PHP-FPM upstream; change it accordingly to your local config!
upstream php-fpm {
@rashkopetrov
rashkopetrov / mongodb_and_php7.md
Last active December 3, 2019 14:28
Install MongoDB and make it work with PHP 7.0

Install MongoDB

  1. Import the public key used by the package management system.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
  1. Create a list file for MongoDB.
@sumonst21
sumonst21 / generate_resize_thumb.sh
Created July 20, 2020 04:01
Check if thumbnail exists else generate resized thumbnail from original image
#! /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
@hieubuiduc
hieubuiduc / install_gearman_php.sh
Created December 12, 2015 17:42
Install Gearman PHP extension on CentOS 6,7
#!/bin/sh
# Auto update
yum update
# Install the required packages
yum install libgearman-devel gcc
# Install php
yum -y install php php-pear php-mysql php-mcrypt php-mbstring
wget https://github.com/wcgallego/pecl-gearman/archive/master.zip
unzip master.zip
cd pecl-gearman-master
phpize
./configure
make install
echo "extension=gearman.so" > /etc/php/7.0/mods-available/gearman.ini
phpenmod -v ALL -s ALL gearman
service php7.0-fpm restart
@tegansnyder
tegansnyder / Using PHP ZTS (Zend Thread Safety) module and pthreads on PHP7 Webstatic Repo (Centos-RHEL).md
Last active November 20, 2020 13:06
Using PHP ZTS (Zend Thread Safety) module and pthreads on PHP7 Webstatic Repo (Centos/RHEL)

BECOM SUDO USER:

sudo -s

INSTALL WEBSTATIC REPO FOR CENTOS/RED HAT 7:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
@derekkwok
derekkwok / encode.py
Last active December 5, 2020 12:14
Simple python script to encode videos using ffmpeg
"""
This python script encodes all files that have the extension mkv in the current
working directory.
Sources:
http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide
"""
import subprocess, os
#-------------------------------------------------------------------------------