Skip to content

Instantly share code, notes, and snippets.

View khairulhasanmd's full-sized avatar

Md. Khairul Hasan khairulhasanmd

View GitHub Profile

Using Git to Manage a Live Web Site

###Overview

As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.

####Contents

For a very fragile workaround, you can edit /usr/lib/python3/dist-packages/certbot_nginx/configurator.py and replace
return [challenges.HTTP01, challenges.TLSSNI01]
with
return [challenges.HTTP01]
(or you… can use the webroot plugin)
@khairulhasanmd
khairulhasanmd / common.txt
Created December 8, 2021 08:03 — forked from saniyathossain/common.txt
Stacks, Coding Guidelines, Acronyms
STACKS:
Project management: Agile, Scrum, JIRA (tool)
Version Control: GIT, Github (Repo), Gitlab (Repo), Bitbucket (Repo), Azure (Repo)
Back-end: PHP (MVC (Model View Controller): Laravel, CakePHP, Symphony, Codeigniter, YII, micro-framework: Lumen, Slim), CMS (Content Management System): Wordpress, Prestashop, Joomla, Magento, Opencart
ORM (Object Relational Mapping): Eloquent (Built in with laravel framework), CakePHP ORM (Built in with CakePHP framework), RedBeanPHP
PHP modules: PHP FPM, PHP CLI
Unit Test: PHPUnit, Codeception, PEST (framework)
Async PHP: Swoole, ReactPHP, Laravel Octane
Cache: File, Memcache, Redis, Database
@khairulhasanmd
khairulhasanmd / query.sql
Created April 4, 2024 05:56
Mysql Get child table data as json in same row
SELECT a.id, a.product_name, a.pdf_url,
JSON_ARRAYAGG(
JSON_OBJECT(
'id', c.id,
'name', c.name
)
) AS tag
FROM products a
LEFT JOIN product_tags b ON (a.id = b.product_id)
LEFT JOIN tags c ON (b.tag_id = c.id)
nano ~/.bashrc
press ctrl+end and put there:
crwl() {
wget --tries=inf --timestamping --recursive --level=inf --convert-links --page-requisites --no-parent "$@"
}
ctrl+O
@khairulhasanmd
khairulhasanmd / gist:6fc7691db878d615d63dcbf00e0973c0
Created July 30, 2024 18:26 — forked from ibnux/gist:59dd7d64bd9cb7e1e670b6ddd70ad991
Mikrotik Script for DHCP Lease to Queue simple
:local queueName "Client-$leaseActMAC";
:local ipAdd "$leaseActIP/32";
:if ([:len [/queue simple find name=$queueName]] = 0) do={
:log info "No Queue";
/queue simple add name=$queueName target=($ipAdd) limit-at=10M/4M max-limit=10M/4M comment=[/ip dhcp-server lease get [find where active-mac-address=$leaseActMAC && active-address=$leaseActIP] host-name];
} else={
:log info "exists";
:local ada [/queue simple get [find name=$queueName] target];