Skip to content

Instantly share code, notes, and snippets.

View trungpv1601's full-sized avatar
🤖
Diversifying; Practical; more code than talk.

trungpv trungpv1601

🤖
Diversifying; Practical; more code than talk.
View GitHub Profile
@trungpv1601
trungpv1601 / ns_sample_client_script_2x.js
Created May 10, 2019 07:36
Netsuite Sample Client Script 2.0
define([], function() {
/**
* Sample Client Script
* @NApiVersion 2.x
* @NModuleScope Public
* @NScriptType ClientScript
*/
/* === VARS === */
@trungpv1601
trungpv1601 / ns_restlet_2x.js
Created May 9, 2019 08:14
Netsuite Restlet sample
/**
*@NApiVersion 2.x
*@NScriptType Restlet
*/
define(
[
'N/search',
'N/record',
'N/cache',
'N/format'
@trungpv1601
trungpv1601 / .prettierrc
Created April 15, 2019 03:20
Prettier PHP
{
"printWidth": 100,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"trailingComma": "none",
"braceStyle": "psr-2",
"requirePragma": false,
"insertPragma": false
}
@trungpv1601
trungpv1601 / composer.json
Created April 13, 2019 04:54
PHP Composer package locally
{
"name": "trungpv/application",
...
"repositories": {
"dev-package": {
"type": "path",
"url": "relative/or/absolute/path/to/my/dev-package",
"options": {
@trungpv1601
trungpv1601 / Magento 2 Install Step by Step.MD
Last active April 3, 2019 08:00
Magento 2 Install Step by Step
@trungpv1601
trungpv1601 / Magento 2 ownership and permissions.MD
Last active April 3, 2019 08:00
Magento 2 ownership and permissions
cd <your Magento install dir> 
find . -type f -exec chmod 644 {} \;                        // 644 permission for files
find . -type d -exec chmod 755 {} \;                        // 755 permission for directory 
find ./var -type d -exec chmod 777 {} \;                // 777 permission for var folder    
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chown -R :<web server group> .
<?php
namespace Deployer;
$startTime = microtime(true);
require 'recipe/common.php';
// Project name
set('application', 'xxx');
@trungpv1601
trungpv1601 / my.cnf
Created March 23, 2019 09:36 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# === Updated December 2018 ===
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have less or more resources available you should adjust accordingly to save CPU,
# RAM and disk I/O usage.
# The settings marked with a specific comment or the word "UPD" after the value
@trungpv1601
trungpv1601 / lamp-setup.sh
Last active March 20, 2019 07:53
lamp-setup.sh
#!/bin/bash
sudo apt-get update
sudo apt-get upgrade
sudo apt install apache2 -y
sudo apt install mysql-server -y
sudo mysql_secure_installation