freddan88 / dev-scripts

Scripts to help developers - ToDo README

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dev-scripts

Scripts to help web developers speed up their work...

Available Scripts:

Script name macOS Windows Linux
phpsrv Available Available Available
npmgensh Available Not available Not available

phpsrv

This script will launch a small php/http server in the current working directory

macOS-phpsrv
Tested on:
Dependencies:

You need to have PHP and a Web Browser installed:

Examples:

Installation:

1 Download and extract the script from your terminal

wget
unzip

2 Change permissions on the script to make it executable

chmod 754 phpsrv

3 Create a link to a directory in your Path

ln -s
Configuration:
1
2
3
Usage:

Open a new terminal and type phpsrv

/Users/user/Desktop: phpsrv

Windows-phpsrv
Tested on:
  • Windows 7 Home x64
  • Windows 10 Pro x64
Dependencies:

You need to have PHP and a Web Browser installed:

Examples:

Installation:

Extract the script and add it to the Windows PATH

rundll32 sysdm.cpl,EditEnvironmentVariables
  • 4 Click on Path in user defined variables and then edit
  • 5 Append this to the end of the value-string and click save
;C:\$Bin
Configuration:

Open the script in your text editor and edit below:

set my_port=8000
set lan_int=Local Area Connection
set php_exe=C:\MAMP\bin\php\php7.2.10\php
set browser=C:\Program Files (x86)\Google\Chrome\Application\chrome
  • php_exe: Needs to point to your executable.
    - This can be either MAMP, XAMPP or WAMPs php

  • lan_int: Change to the name of your network adapter.
    - Tip: In CMD you can type below command to reveal the name

netsh interface ip show addresses
  • browser: Change to the path to your browser
    - Tip is to use either Google Chrome or Mozilla Firefox
Usage:

Open a new prompt (CMD) and type phpsrv

C:\htdocs>phpsrv

Linux-phpsrv
Tested on:
Dependencies:

You need to have PHP a Web Browser and some tools installed:

Examples:

Ubuntu

sudo apt-get install wget

CentOS

yum install wget
Installation:

1 Download you extract the script from your terminal

wget URL/phpsrv.sh

2 Change permissions on the script to make it executable

chmod 754 phpsrv.sh

3 Create a link to a directory in your Path

ln -s example example
Configuration:
1
2
3
Usage:

Open a new terminal and type phpsrv

/home/user: phpsrv

About

Scripts to help developers - ToDo README

License:MIT License


Languages

Language:JavaScript 51.8%Language:Shell 21.6%Language:CSS 17.0%Language:Batchfile 6.4%Language:HTML 3.2%