Skip to content

Instantly share code, notes, and snippets.

View skmezanul's full-sized avatar

SK Mezanul Haque skmezanul

View GitHub Profile
@skmezanul
skmezanul / example-skills-block
Created November 10, 2019 21:28
This example is just really simple, the main shortcode is simple enough to not need any options or globals applied, it simply wraps the innner shortcodes.
<?php
/**
* The Shortcode
*/
function ebor_skills_shortcode( $atts, $content = null ) {
$output = '<div class="skills-wrapper">'. do_shortcode($content) .'</div>';
return $output;
}
add_shortcode( 'machine_skills', 'ebor_skills_shortcode' );
@skmezanul
skmezanul / drush_admin_create
Created May 2, 2019 07:04 — forked from ecorson/drush_admin_create
Add admin user via Drush
drush user-create adminuser --mail="adminuser@uiowa.edu" --password="UserPw"; drush user-add-role "administrator" adminuser
A curated list of awesome PHP frameworks, libraries and software.
* [laravel/laravel](https://github.com/laravel/laravel) - A PHP Framework For Web Artisans
* [symfony/symfony](https://github.com/symfony/symfony) - The Symfony PHP framework
* [bcit-ci/CodeIgniter](https://github.com/bcit-ci/CodeIgniter) - Open Source PHP Framework (originally from EllisLab)
* [domnikl/DesignPatternsPHP](https://github.com/domnikl/DesignPatternsPHP) - sample code for several design patterns in PHP
* [fzaninotto/Faker](https://github.com/fzaninotto/Faker) - Faker is a PHP library that generates fake data for you
* [yiisoft/yii2](https://github.com/yiisoft/yii2) - Yii 2: The Fast, Secure and Professional PHP Framework
* [composer/composer](https://github.com/composer/composer) - Dependency Manager for PHP
@skmezanul
skmezanul / apache_error_log_parser.sh
Created November 19, 2018 19:45 — forked from marcanuy/apache_error_log_parser.sh
Apache error log list ordered by most common errors
#!/bin/bash
sed 's^\[.*\]^^g' error.log | sed 's^\, referer: [^\n]*^^g' | sort | uniq -c | sort -n
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
/* ======================================================
This script is NOT FULLY TESTED (not tested on Windows Server either)
USE AT YOUR OWN RISK - development environment Ubuntu Linux 14.04.3 LTS
The purpose of this script is for small websites and blogs
@skmezanul
skmezanul / find-base64-occurences
Created March 28, 2018 12:31 — forked from anotheremily/find-base64-occurences
hackers seem to like base64 encoding their php commands
#!/bin/bash
find . -name "*.php" -exec grep "base64" '{}' \; -print &> b64-detections.txt
find . -name "*.php" -exec grep "eval" '{}' \; -print &> eval-detections.txt
@skmezanul
skmezanul / youtube-dl-download-videos.md
Last active January 11, 2021 22:04 — forked from ivanskodje/youtube-dl-download-pluralsight-videos.md
youtube-dl for downloading videos from a popular dev training site

Downloading Videos from the training site

Disclaimer

The training site do not permit users to download their videos.
If you are an user of the site you have agreed with their ToS,
and are thusly refrained from doing so.
Use this knowledge at your own risk.

youtube-dl for Windows

@skmezanul
skmezanul / youtube-dl-download-training-site.md
Last active December 14, 2017 15:46 — forked from munim/youtube-dl-download-pluralsight.md
youtube-dl to download from a famous online developer training site

Download videos

Software required:

youtube-dl

After installation and putting the youtube-dl in PATH

youtube-dl \
@skmezanul
skmezanul / youtube-dl.md
Last active December 14, 2017 15:43
Using youtube-dl to download courses from a famous online developer training site.

Download courses from learning sites with youtube-dl

You can download whole courses from an array of tutorial sites with the CLI tool youtube-dl. In the example further down I'm using my training site account to get videos from a course at their site. Here is a list of all supported sites that you can download from with this tool

The flags you have to supply may vary depending on which site you make a request to.

You can get a free 3 month trial to the training site by signing up for free to Visual Studio Dev Essentials

Installation

@skmezanul
skmezanul / ps-checkout-shortcode.php
Created October 10, 2017 11:51 — forked from panoslyrakis/ps-checkout-shortcode.php
Provides a shortcode to add the Pro Sites checkout form in any page
<?php
/*
Plugin Name: Pro Sites - Checkout Shortcode
Plugin URI: https://premium.wpmudev.org/
Description: Provides a shortcode to add the Pro Sites checkout form in any page
Author: Panos Lyrakis @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/