Skip to content

Instantly share code, notes, and snippets.

View davinderpalrehal's full-sized avatar

Davinderpal Singh Rehal davinderpalrehal

View GitHub Profile
@davinderpalrehal
davinderpalrehal / php-default-test
Last active November 3, 2019 13:11
Nginx configuration to work with PHP
server {
# Using port 8080 only for testing purposes
listen 8080 default_server;
listen [::]:8080 default_server;
# Where are the files that are being served
root /srv/www/html;
# Default Index file being served, have added `index.php`
index index.php index.html index.htm index.nginx-debian.html;
@davinderpalrehal
davinderpalrehal / default
Created November 2, 2019 06:46
Nginx Default config - 2019
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
@davinderpalrehal
davinderpalrehal / Setting.json
Created May 17, 2016 12:47
Visual Studio Code - User settings
// Overwrite settings by placing them into your settings file.
{
//-------- Editor configuration --------
// Controls the font family.
"editor.fontFamily": "",
// Controls the font size.
"editor.fontSize": 0,
@davinderpalrehal
davinderpalrehal / Vagrantfile
Last active May 15, 2016 16:47
My get up and running with Vagrant fast Vagrantfile
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "private_network", ip: "192.168.33.10"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
public function setPlateNumber($plateNumber)
{
$strip = explode(" ", $plateNumber);
if (isset($strip[1])) {
$plateNumber = "";
foreach ($strip as $num) {
$plateNumber .= $num;
}
}