Skip to content

Instantly share code, notes, and snippets.

View trinvh's full-sized avatar

Tri Nguyen trinvh

View GitHub Profile
# install php repository
add-apt-repository ppa:ondrej/php && apt update -y
# install php7.3 and extensions
apt install php7.3 php7.3-fpm php7.3-mbstring php7.3-zip php7.3-gd php7.3-mysql php7.3-curl
# configure php7.3-fpm default pool to run as nginx and listen on specific port instead of unix socket
# open config file with your favourite editor and replace `group www-data` and `user www-data` with `group nginx` and `user nginx`
# replace `listen /somewhere/php.sock` to `listen 9003`
@trinvh
trinvh / rook-ceph
Last active September 10, 2020 06:44
#################################################################################################################
# Define the settings for the rook-ceph cluster with common settings for a production cluster.
# All nodes with available raw devices will be used for the Ceph cluster. At least three nodes are required
# in this example. See the documentation for more details on storage settings available.
# For example, to create the cluster:
# kubectl create -f common.yaml
# kubectl create -f operator.yaml
# kubectl create -f cluster.yaml
#################################################################################################################
@trinvh
trinvh / print.css
Created September 21, 2019 06:09
print.css
.voucher {
width: 700px;
overflow: hidden;
position: relative;
}
.voucher img {
width: 700px;
}
.voucher-discount {
position: absolute;
drop trigger if exists inetdb.inetdbkhuyenmai_theo_gio;
use inetdb;
DELIMITER $$
CREATE TRIGGER inetdbkhuyenmai_theo_gio BEFORE INSERT ON tblvoucherlog
FOR EACH ROW
BEGIN
-- select the newest payment of this user from paymenttb
SET @RECENT_PAYMENT_TYPE = (SELECT VoucherType FROM tblvoucherlog WHERE UserId = NEW.UserId ORDER BY VoucherId DESC LIMIT 1);
class Sentry {
static init() {
console.log('fake sentry');
}
}
$Global:BaseDir = "c:\k"
$Global:GithubSDNRepository = 'Microsoft/SDN'
$Global:GithubSDNBranch = 'master'
$Global:NetworkName = "cbr0"
$Global:NetworkMode = "l2bridge"
$Global:DockerImageTag = "1809"
$Global:Configuration = @{}
$Global:MasterUsername = "localadmin"
$Global:NanoserverImage = "mcr.microsoft.com/windows/nanoserver:1809"
@trinvh
trinvh / .env
Created June 11, 2018 10:37
mixcord-dev.env
{
"environment": "dev"
}
@trinvh
trinvh / dev-mixcord-default.conf
Last active June 14, 2018 06:42
dev-mixcord-default.conf
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
root /var/www/html;
index index.ssp index.html index.htm index.php;
server_name _;
@trinvh
trinvh / .env
Created May 27, 2018 06:08
mixcord-staging.env
{
"environment": "staging"
}
@trinvh
trinvh / .env
Created May 27, 2018 06:07
mixcord-prod.env
{
"environment": "prod"
}