2017 © Pedro Peláez
 

library tools

Some PHP and bash tools

image

m4rc1no5/tools

Some PHP and bash tools

  • Friday, December 11, 2015
  • by m4rc1no5
  • Repository
  • 1 Watchers
  • 0 Stars
  • 221 Installations
  • Shell
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

tools

Total Downloads, (*1)

This project contains useful tools to improve my work. :), (*2)

Documentation

Table of contents

  1. Installation
  2. Add ssh key to remote linux machine
  3. Add virtual host in Apache
  4. Add virtual host in Nginx
  5. PHP Convert String

, (*3)

Installation

This tools are available at packagist.org, so you can use composer to download this library and all dependencies., (*4)

(add to require section in your composer.json file), (*5)

    {
        "require": {
            "m4rc1no5/tools": "dev-master"
        }
    }

, (*6)

Add ssh key to remote linux machine

This script send and add your public SSH Key to Remote Server., (*7)

Example

bash/AddSshKey/addSshKey.sh marceen 123.123.123.123 222

variables: - marceen - username - 123.123.123.123 - hostname - 222 - port, (*8)

If remote server (or your machine) doesn't have ~/.ssh folder You can create it by command:, (*9)

ssh-keygen -t rsa

, (*10)

Add Virtual Host in Apache

This script creates localhost website folder and adds virtual domain with sufix .lh, (*11)

Remember

Before run this script You must create config.sh file from config.sh.default! This file is in folder: bash/AddVirtualHostApache/, (*12)

Example

Run this command, (*13)

sudo bash/AddVirtualHostApache/addVirtualHostApache.sh test

will create local domain test.lh., (*14)

After this script You can enter browser and write adress test,lh and You will see "hello test!" on screen. :), (*15)

, (*16)

Add Virtual Host in Nginx

This script creates localhost website folder and adds virtual domain with sufix .lh, (*17)

Remember

Before run this script You must create config.sh file from config.sh.default! This file is in folder: bash/AddVirtualHostNginx/, (*18)

Example

Run this command, (*19)

sudo bash/AddVirtualHostApache/addVirtualHostNginx.sh test

will create local domain test.lh., (*20)

After this script You can enter browser and write adress test,lh and You will see "hello test!" on screen. :), (*21)

, (*22)

PHP Convert String

Underscore to Camelcase

Convert string from underscore to camelcase, (*23)

use m4rc1no5_tools\Convert\String\UnderscoreToCamelcase;

$field_name = "this_is_foo_bar";

$camelcase_field_name = UnderscoreToCamelcase::underscoreToCamelcase($field_name); // return thisIsFooBar

The Versions

11/12 2015

dev-master

9999999-dev

Some PHP and bash tools

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

php bash command line apache linux nginx cmd