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 / LICENCE SUBLIME TEXT
Created August 28, 2018 16:20
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@sumonst21
sumonst21 / php-style-guide.md
Created October 12, 2018 18:23 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@sumonst21
sumonst21 / Wordpress Plugin
Created December 11, 2018 13:32 — forked from swapnil-webonise/Wordpress Plugin
Simple wordpress plugin for inserting form details into database using ajax and usual form submit.
Download and copy jquery library in directory.
In this plugin jquery-1.8.3.js is used.
@sumonst21
sumonst21 / http-redirect-target.php
Created March 24, 2019 15:20
Get HTTP redirect destination for a URL in PHP
<?php
// FOLLOW A SINGLE REDIRECT:
// This makes a single request and reads the "Location" header to determine the
// destination. It doesn't check if that location is valid or not.
function get_redirect_target($url)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
@sumonst21
sumonst21 / perms.md
Created March 26, 2019 00:49 — forked from stefanbc/perms.md
Set proper permissions on /var/www/

HOWTO

To set up permissions on /var/www where your files are served from by default:

sudo addgroup webmasters
sudo adduser $USER webmasters
sudo chown -R root:webmasters /var/www
sudo find /var/www -type f -exec chmod 664 {} \;
sudo find /var/www -type d -exec chmod 775 {} \;
@sumonst21
sumonst21 / multiple-php.txt
Created April 9, 2019 18:10 — forked from anwas/multiple-php.txt
[Multiple PHP versions on Ubuntu]
## Add repository
### https://launchpad.net/%7Eondrej/+archive/ubuntu/php
### https://launchpad.net/~ondrej/+archive/ubuntu/apache2
sudo add-apt-repository ppa:ondrej/php
sudo add-apt-repository ppa:ondrej/apache2
sudo apt-get update
sudo apt-get dist-upgrade
@sumonst21
sumonst21 / pidoa.php
Created April 11, 2019 10:59 — forked from tzi/pidoa.php
Pidoa - Rename TV shows files automatically
<?php
function usage( $argv ) {
echo PHP_EOL .
'Pidoa' . PHP_EOL .
'------------' . PHP_EOL .
'This script allow you to rename tv shows easily' . PHP_EOL .
PHP_EOL .
'Usage: php ' . $argv[ 0 ] . ' <folder_path> <pattern>' . PHP_EOL .
'Example: php ' . $argv[ 0 ] . ' ./ "Babylon 5 S%Sx%E %V"' . PHP_EOL .
@sumonst21
sumonst21 / README.md
Created April 11, 2019 19:09 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@sumonst21
sumonst21 / responsive-video.html
Created April 29, 2019 00:39
Placeholder image for video with button onclick load iframe. You can switch this around between youtube and vimeo or any other thirdparty video player.
<style>
.btn-video {
font-family: 'Montserrat', sans-serif;
@include button-size(20px, 60px, 16px, 14px, 16px);
@include button-variant(#FFF, rgba(0,0,0,0.5), #FFF);
&:visited, &:hover, &:active {
@include button-variant(#FFF, rgba(0,0,0,0.7), #FFF);
-webkit-box-shadow: 0px 1px 7px -2px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 1px 7px -2px rgba(0,0,0,0.75);
@sumonst21
sumonst21 / codeiginter-server-config.md
Created May 10, 2019 20:58 — forked from yidas/codeiginter-server-config.md
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: