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
@masiur
masiur / self-vs-static.php
Created July 11, 2023 06:10 — forked from AaronFlower/self-vs-static.php
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
@masiur
masiur / instruction.md
Created December 18, 2017 09:14 — forked from ratul0/instruction.md
Laravel mail with supervisor

Frist run this migrations :

php artisan queue:table

php artisan queue:failed-table

php artisan migrate
@masiur
masiur / instruction.md
Created December 18, 2017 09:14 — forked from ratul0/instruction.md
Laravel mail with supervisor

Frist run this migrations :

php artisan queue:table

php artisan queue:failed-table

php artisan migrate
@masiur
masiur / Dependent Dropdown.md
Last active August 7, 2017 11:28 — forked from talha08/Depandable dropdoen
Dependent Dropdown

Dependent Dropdown

Example of Select Region After Selecting State

   public function showFormFunction()
    {
	$states = State::lists('display_name', 'id');
	$regions = ['Please select state first'];
	return view('dashboard', compact(['states']))
		    ->with('regions', $regions);
    }
@masiur
masiur / meta-tags.md
Created December 20, 2016 14:30 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@masiur
masiur / server_config.md
Created April 21, 2016 20:08 — forked from da-n/server_config.md
Basic server config.

Server config

This is a collection of condensed, edited articles to aid in setting up a new server. Credits are at the bottom of this document.

Initial server setup

1. Login

Login as the main user:

@masiur
masiur / digital_ocean_lamp_setup.md
Created April 21, 2016 19:45 — forked from linhai86/digital_ocean_lamp_setup.md
Digital Ocean LAMP Setup (Ubuntu 14.04)

[Initial Server Setup with Ubuntu 14.04] [1]

ssh root@SERVER_IP_ADDRESS

adduser demo

# Add the new user to the sudo group
gpasswd -a demo sudo

# Add public key to new remote user
@masiur
masiur / README.md
Created April 21, 2016 19:41 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@masiur
masiur / gist:f7940a9de23241b10000b9f00394c6eb
Created April 12, 2016 09:52 — forked from ratulcse10/gist:b60a4a32689011b24af1
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
@masiur
masiur / nodejs.sh
Created April 12, 2016 09:51 — forked from ratulcse10/nodejs.sh
install nodejs in ubuntu
sudo apt-get install nodejs
sudo apt-get install npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g express