Skip to content

Instantly share code, notes, and snippets.

View skmezanul's full-sized avatar

SK Mezanul Haque skmezanul

View GitHub Profile
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 / 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="[email protected]" --password="UserPw"; drush user-add-role "administrator" adminuser
@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' );
#!/usr/bin/env python3
'''
calisuck: index, filter-out smartly and download ebooks from Calibre open directories
Installation:
You need python 3.5 installed
Download the file as a zip and unzip-it and get into the dir
@skmezanul
skmezanul / youtube_id_regex.php
Created January 5, 2020 13:30 — forked from ghalusa/youtube_id_regex.php
Extract the YouTube Video ID from a URL in PHP
<?php
// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored)
// http://youtu.be/dQw4w9WgXcQ
// http://www.youtube.com/embed/dQw4w9WgXcQ
// http://www.youtube.com/watch?v=dQw4w9WgXcQ
// http://www.youtube.com/?v=dQw4w9WgXcQ
// http://www.youtube.com/v/dQw4w9WgXcQ
// http://www.youtube.com/e/dQw4w9WgXcQ
// http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ
@skmezanul
skmezanul / RemoveOptions.php
Created December 9, 2020 20:28 — forked from bh-ref/RemoveOptions.php
Remove/Delete Product Attribute Options in Magento 2
<?php
namespace Vendor\ModuleName\Options;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory;
class RemoveOptions
{
@skmezanul
skmezanul / .htaccess
Created February 28, 2022 21:49 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@skmezanul
skmezanul / raspbian-64bit-headless.md
Last active March 21, 2022 10:08 — forked from bartosjiri/raspbian-64bit-headless.md
Raspberry Pi Raspbian 64bit headless setup

Raspberry Pi Raspbian 64bit headless setup

A step-by-step guide for running a headless Raspbian 64bit kernel and OS on Raspberry Pi. The provided configuration has been tested on models 3B, 3B+ and 4B.

Instructions

  1. Download the Raspberry Pi Imager application.

  2. Use the application to download Raspbian Lite (under Raspbian (other)) and write the image on your SD card.

  3. Setup wireless connection configuration by creating wpa_supplicant.conf file in the boot folder:

@skmezanul
skmezanul / windows_hardening.cmd
Created March 29, 2022 18:55 — forked from ricardojba/windows_hardening.cmd
A Windows hardening script
::##########################################################################################################################
::
:: This script can ruin your day, if you run it without fully understanding what it does, you don't know what you are doing,
::
:: OR BOTH!!!
::
:: YOU HAVE BEEN WARNED!!!!!!!!!!
::
:: This script is provided "AS IS" with no warranties, and confers no rights.
:: Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section,
@skmezanul
skmezanul / install_realvnc_server.sh
Created March 9, 2023 19:24 — forked from vietanhdev/install_realvnc_server.sh
Install RealVNC Ubuntu - Raspberry Pi 4
#!/bin/bash
mkdir realvncserversetup && cd realvncserversetup
echo Add armhf arch
sudo dpkg --add-architecture armhf && sudo apt update
echo Download and install RealVNC server
wget -nv https://downloads.realvnc.com/download/file/vnc.files/VNC-Server-6.11.0-Linux-ARM.deb && sudo apt install ./VNC-Server-6.11.0-Linux-ARM.deb
echo Download and install dependencies