Skip to content

Instantly share code, notes, and snippets.

View emirajbbd's full-sized avatar

MD ENAMUL HAQUE emirajbbd

  • Harris Web Works Dhaka Ltd
  • Bangladesh
View GitHub Profile
@emirajbbd
emirajbbd / wp-update
Created April 6, 2023 10:50 — forked from keesiemeijer/wp-update
A bash script to update everything WordPress (core, plugins, themes and comments).
#!/usr/bin/env bash
# =============================================================================
#
# *** WARNING: THIS SCRIPT IS NO LONGER MAINTAINED ***
#
# use https://github.com/keesiemeijer/wp-update instead
#
# =============================================================================
@emirajbbd
emirajbbd / Magento 2 - Remove all customer data
Created December 20, 2021 18:22 — forked from rafaelstz/Magento 2 - Remove all customer data
Remove all Magento 2 test Sample Data
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE TABLE `customer_entity`;
TRUNCATE TABLE `customer_entity_datetime`;
TRUNCATE TABLE `customer_entity_decimal`;
TRUNCATE TABLE `customer_entity_int`;
TRUNCATE TABLE `customer_entity_text`;
TRUNCATE TABLE `customer_entity_varchar`;
TRUNCATE TABLE `customer_address_entity`;
TRUNCATE TABLE `customer_address_entity_datetime`;
  • Maximum Open Files
You requested maxclients of 10000 requiring at least 10032 max file descriptors.
Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
@emirajbbd
emirajbbd / example.phtml
Created March 23, 2021 09:53 — forked from guz-anton/example.phtml
Instagram feed. Magento 2 + instafeed.js snippet.
<div data-role="instafeed" class="instafeed-container"></div>
<script type="text/x-magento-init">
{
"[data-role=instafeed]": {
"instafeed-loader": {
"userId": "{{userId}}", // https://stackoverflow.com/q/11796349
"accessToken": "{{accessToken}}" // https://www.instagram.com/developer/authentication/
}
}
}
@emirajbbd
emirajbbd / 404.html
Created October 30, 2020 23:15 — forked from Rady/404.html
Trying to secure Nginx the most for Joomla CMS under Ubuntu 11.10
<!-- to be saved at /usr/share/nginx/html/404.html -->
<html lang="en"><head><meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}
</style>
<link type="text/css" rel="stylesheet" href="chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/style.css"><script type="text/javascript" charset="utf-8" src="chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/page_context.js"></script></head><body screen_capture_injected="true">
<!--
@emirajbbd
emirajbbd / upstream.md
Created May 14, 2020 03:10 — forked from hackjutsu/upstream.md
[set upstream] What does '--set-upstream' do? #tags: git
git branch --set-upstream-to <remote-branch>
# example
git branch --set-upstream-to origin feature-branch

# show up which remote branch a local branch is tracking
git branch -vv

sets the default remote branch for the current local branch.

@emirajbbd
emirajbbd / opcache.ini
Created January 16, 2020 01:51 — forked from rohankhudedev/opcache.ini
Best Zend OpCache Settings / Tuning / Configurations
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=1
; The OPcache shared memory storage size.
opcache.memory_consumption=512
For OpenVZ refer this URL: (https://openvz.org/User_Guide/Operations_on_Containers)
=======================
vzlist -a ------ To list all the containers on OpenVZ including running and stopped.
vzlist -a 101 ----- To check specific container is present or not (101 => Container ID)
/vz/template/cache ------ Contains all the OS templates
/vz/private/ ----- it contains list of all the existing containers.
@emirajbbd
emirajbbd / customers.sql
Created December 18, 2018 16:44 — forked from leek/_Magento1_DeleteTestData.md
Magento - Delete All Test Data
SET FOREIGN_KEY_CHECKS=0;
-- Customers
TRUNCATE `customer_address_entity`;
TRUNCATE `customer_address_entity_datetime`;
TRUNCATE `customer_address_entity_decimal`;
TRUNCATE `customer_address_entity_int`;
TRUNCATE `customer_address_entity_text`;
TRUNCATE `customer_address_entity_varchar`;
TRUNCATE `customer_entity`;