This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Author: Kashyap Merai | [email protected] | |
# Variables | |
ch_1="pm2 Production Setup." | |
ch_2="pm2 Production Update." | |
ch_3="pm2 Production." | |
ch_4="pm2 Development Setup." | |
ch_5="pm2 Development." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
server_name dev ipv6only=on; | |
root /usr/share/nginx/html; | |
index index.php index.html index.htm; | |
location ~ \.php$ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name dev ipv6only=on; | |
root /usr/share/nginx/html; | |
index index.php index.html index.htm; | |
location ~ \.php$ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apps" : { | |
"name" : "vuejs", | |
"script" : "./server.js", | |
"watch" : true, | |
"instances" : 4, | |
"exec_mode" : "cluster", | |
"env": { | |
"COMMON_VARIABLE": "true" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"deploy": { | |
"production": { | |
"user": "server-user", | |
"host": "server-ip", | |
"repo": "[email protected]/vuejspm2.git", | |
"ref": "origin/master", | |
"path": "/var/www/production", | |
"post-deploy": "npm install && npm run build && pm2 startOrRestart ecosystem.json --env production" | |
}, | |
"development": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
server_name dev ipv6only=on; | |
root /usr/share/nginx/html; | |
index index.php index.html index.htm; | |
location /mynodeapp { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function validIdentification($number) | |
{ | |
if (strlen($number) !== 9) { | |
return false; | |
} | |
$newNumber = strtoupper($number); | |
$icArray = []; | |
for ($i = 0; $i < 9; $i++) { | |
$icArray[$i] = $newNumber{$i}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\API\v1\Users; | |
use App\Http\Controllers\Controller; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Validator; | |
use App\Entities\Models\User; | |
class UserController extends Controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Requests; | |
use Illuminate\Foundation\Http\FormRequest; | |
class UserStoreRequest extends FormRequest | |
{ | |
/** | |
* Determine if the user is authorized to make this request. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers\API\v1\Users; | |
use App\Http\Controllers\Controller; | |
use App\Http\Requests\UserStoreRequest; | |
class UserController extends Controller | |
{ | |
public function store(UserStoreRequest $request) |
OlderNewer