Skip to content

Instantly share code, notes, and snippets.

View masiur's full-sized avatar
💭
I may be slow to respond.

Masiur Rahman Siddiki masiur

💭
I may be slow to respond.
View GitHub Profile
@atiqsu
atiqsu / Environment setup for macbook
Last active April 12, 2023 05:09
Contributing to wordpress core
1. Install docker and run it. Make sure icon shows in top-right corner of mac
2. Make sure you have npm installed - npm -v
3. Make sure you have nvm installed - nvm -v
4. Make sure you have Node installed -
5. Make sure you have node version 14.x installed if not
5.1. nvm install 14 #do not give specific version i.e. 14.17.3 this may raise npm error
6. Go to https://github.com/WordPress/wordpress-develop
6.1. fork it
6.2. git clone it anywhere you like
6.3. open terminal and cd to the cloned directory
Serial Keys:
FU512-2DG1H-M85QZ-U7Z5T-PY8ZD
CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD
GV7N2-DQZ00-4897Y-27ZNX-NV0TD
YZ718-4REEQ-08DHQ-JNYQC-ZQRD0
GZ3N0-6CX0L-H80UP-FPM59-NKAD4
YY31H-6EYEJ-480VZ-VXXZC-QF2E0
ZG51K-25FE1-H81ZP-95XGT-WV2C0
VG30H-2AX11-H88FQ-CQXGZ-M6AY4
@RafikFarhad
RafikFarhad / lemp_setup.sh
Created April 28, 2018 20:54
LEMP Stack for Ubuntu 18.04
#!/bin/bash
GREEN='\033[0;32m'
CYAN='\033[0;36m'
NC='\033[0m'
echo "${CYAN}Welcome to Easy LEMP Stack Setup${NC}"
echo "${CYAN}Ubuntu 18.04 Supported${NC}"
echo "${GREEN}Created By SUST CSE Developer Network (SCDN)\n${NC}"
echo "${GREEN}Maintained By Rafik Farhad\n${NC}"
@AaronFlower
AaronFlower / self-vs-static.php
Last active July 11, 2023 06:10
What is the difference between new self and new static?
<?php
/**
* What is the difference between new self and new static?
* self refers to the same class in which the new keyword is actually written.
*
* static, in PHP 5.3's late static bindings,
* refers to whatever class in the hierarchy you called the method on.
*
* In the following example, B inherits both methods from A.
* The self invocation is bound to A because it's defined in A's implementation
@squarestar
squarestar / install-wp-plugins.php
Last active April 20, 2024 08:02
Programmatically install and activate wordpress plugins
<?php
/**
* Programmatically install and activate wordpress plugins
*
* Usage:
* 1. Edit the $pluginSlugs array at the beginning of this file to include the slugs of all the
* plugins you want to install and activate
* 2. Upload this file to the wordpress root directory (the same directory that contains the
* 'wp-admin' directory).
* 3. Navigate to <your-domain-wordpress-root>/install-wp-plugins.php (If wordpress is installed
@masiur
masiur / setup laravel project on server
Last active June 17, 2016 18:02
Laravel Project setup on UBUNTU server
Execute the Steps serially
laravel 5.1
assuming domain name 'sustcse12.cf'
sudo apt-get update
sudo mkdir -p /var/www/sustcse12.cf/public_html
sudo chown -R $USER:$USER /var/www/sustcse12.cf/public_html
cd /var/www/sustcse12.cf/public_html
<td> <a><button type="button" class="btn btn-info btn-sm" data-toggle="modal" data-target="#myModal_{{$worker->id}}" >Details</button></a></td>
<!-- Modal -->
<div id="myModal_{{$worker->id}}" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content" >
<center>
<div class="modal-header">
@ratulcse10
ratulcse10 / gist:b60a4a32689011b24af1
Created May 15, 2015 20:32
setup tomcat7 on ubuntu 14.04 Real
https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-7-on-ubuntu-14-04-via-apt-get
server slow solution
replacing securerandom.source=file:/dev/urandom with securerandom.source=file:/dev/./urandom from file $JAVA_PATH/jre/lib/security/java.security solved my problem.
$JAVA_HOME is here /usr/lib/jvm/default-java
@msurguy
msurguy / DB.sql
Last active August 20, 2023 18:02
Dynamic dropdown in Laravel, let's say you have multiple drop downs (selects), you click on one and the contents of the other need to be dynamically changed. One solution is to dynamically load JSON from the API and change the dropdown dynamically depending on the user choice.
CREATE TABLE `makers` (
`id` int(10) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(255) NOT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--