Skip to content

Instantly share code, notes, and snippets.

View tranphuquy19's full-sized avatar
🐢
Doraneko

Doraneko tranphuquy19

🐢
Doraneko
  • Vietnam
View GitHub Profile
@tranphuquy19
tranphuquy19 / search.js
Created August 14, 2023 15:18
Search value in a json object
function search(obj, value, checkedObjs = [], path = '') {
if (Array.isArray(obj)) {
for (var i = 0; i < obj.length; i++) {
if (obj[i] === value || (typeof obj[i] === 'string' && obj[i].includes(value))) {
return path + '[' + i + ']';
}
}
} else if (typeof obj === 'function') {
var str = obj.toString();
if (str.includes(value)) {
@tranphuquy19
tranphuquy19 / main.tf
Created April 28, 2023 16:34
aws s3 react app
provider "aws" {
access_key = "YOUR GENERATED ACCESS ID"
secret_key = "YOUR GENERATED SECRET KEY"
region = "us-east-1"
}
variable "root_domain_name" {
default = "frontend.domain.tld"
}
@tranphuquy19
tranphuquy19 / disable-defender.bat
Created April 26, 2023 02:23
Disable Windows Defender scripts
@echo off
rem A modified version of the disable defender script from: https://pastebin.com/kYCVzZPz
@echo on
rem ==========================================
rem This section will Disable Windows Defender
rem You can ignore error messages
rem 1 - Disable Real-time protection
reg delete "HKLM\Software\Policies\Microsoft\Windows Defender" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d "1" /f
Tính năng Istio Linkerd Consul
Thông tin chung
Viết bằng Golang
Mã nguồn mở Có https://github.com/istio/istio Có https://github.com/linkerd/linkerd2 Có https://github.com/hashicorp/consul
Có bản hỗ trợ thương mại Tính năng beta sẵn có trên GCP
Tài liệu hướng dẫn
Được chống lưng bởi Google IBM Buoyant. Các CTO đều là những người làm hạ tầng cho Twitter tách ra để mở công ty riêng HashiCorp. CTO là những người rất trẻ và xây dựng được công ty thành công ty tỷ đô
Phiên bản hiện tại 1.6 2.8 1.8
Kiến trúc sử dụng
Môi trường áp dụng Kubernetes + VM Chỉ có Kubernetes Kubernetes + VM
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=http://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=http://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch
@tranphuquy19
tranphuquy19 / Guest OS Descriptors by VMware Platform.md
Created November 25, 2022 02:46 — forked from dcode/Guest OS Descriptors by VMware Platform.md
When using Packer (or other vmx editing needs), I needed to know what the `guest_os_type` should be according to what platform it was running on. Here you go. If it isn't listed in a column, it didn't exist at that time.
ESXi 6.5 ESXi 6.7 VMware Fusion 11 Guest Description
CRXPod1-64 VMware CRX Pod 1
CRXSys1-64 VMware CRX Sys 1
amazonlinux2-64 Amazon Linux 2 or higher, 64-Bit
asianux3Guest asianux3Guest asianux3 Asianux Server 3
asianux3_64Guest asianux3_64Guest asianux3-64 Asianux Server 3, 64-Bit
asianux4Guest asianux4Guest asianux4 Asia Linux 4
asianux4_64Guest asianux4_64Guest as
@tranphuquy19
tranphuquy19 / Makefile
Created September 22, 2022 17:39 — forked from geta6/Makefile
Makefile for node.js application
#
# Makefile for node application
# by @geta6
#
NODE = node
NPM = npm
PM2 = ./node_modules/.bin/pm2
BOWER = ./node_modules/.bin/bower
@tranphuquy19
tranphuquy19 / run.sh
Last active August 21, 2022 19:39
Angular run.sh file
FROM node:12.22.12-buster-slim as builder
ARG DEBIAN_FRONTEND=noninteractive
ARG NPM_TOKEN=default_value
ARG PROJECT_NAME=web-billing
WORKDIR /${PROJECT_NAME}
RUN npm install -g vsts-npm-auth && \
apt update -y && \
apt install chromium chromium-driver -y
@echo off
rem A modified version of the disable defender script from: https://pastebin.com/kYCVzZPz
@echo on
rem ==========================================
rem This section will Disable Windows Defender
rem You can ignore error messages
rem 1 - Disable Real-time protection
reg delete "HKLM\Software\Policies\Microsoft\Windows Defender" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d "1" /f
@tranphuquy19
tranphuquy19 / gnome.sh
Created March 24, 2022 12:02 — forked from rbellamy/gnome.sh
gnome 3.6.2
# GNOME 3.6.2
# stole fair and square from https://gist.github.com/musinsky/2402448#file-gnome-sh
gsettings set org.gnome.desktop.default-applications.terminal exec 'gnome-terminal --geometry=96x24+0-0'
gsettings set org.gnome.desktop.default-applications.terminal exec-arg '-x'
gsettings set org.gnome.desktop.background picture-options 'none'
gsettings set org.gnome.desktop.background color-shading-type 'vertical'
gsettings set org.gnome.desktop.background primary-color '#3C78B4' # (Red: 60 Green: 120 Blue: 180)
gsettings set org.gnome.desktop.background secondary-color '#1E3C5A' # (Red: 30 Green: 60 Blue: 90)