Skip to content

Instantly share code, notes, and snippets.

View trinhpham's full-sized avatar
🇻🇳
A lot of things here 👯‍♂

Trình Phạm trinhpham

🇻🇳
A lot of things here 👯‍♂
View GitHub Profile
@trinhpham
trinhpham / submit.md
Created September 10, 2018 08:12 — forked from tanaikech/submit.md
Downloading Shared Files on Google Drive Using Curl

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&amp;id=${fileid}"
[HTTP] --> GET /wd/hub/session/54f250eb-5274-4a3a-92f9-0a6b1e65d5e5/contexts
[HTTP] {}
[debug] [W3C (54f250eb)] Calling AppiumDriver.getContexts() with args: ["54f250eb-5274-4a3a-92f9-0a6b1e65d5e5"]
[debug] [XCUITest] Executing command 'getContexts'
[debug] [iOS] Getting list of available contexts
[debug] [iOS] Retrieving contexts and views
[debug] [XCUITest] Selecting by url: false
[debug] [RemoteDebugger] Sending connection key request
[debug] [RemoteDebugger] Sending '_rpc_reportIdentifier:' message (id: 1)
[debug] [RemoteDebugger] Sending to Web Inspector took 7ms
[HTTP] --> GET /wd/hub/session/f18bcfc9-f8f1-444c-8436-bb2aac50844a/contexts
[HTTP] {}
[debug] [W3C (f18bcfc9)] Calling AppiumDriver.getContexts() with args: ["f18bcfc9-f8f1-444c-8436-bb2aac50844a"]
[debug] [XCUITest] Executing command 'getContexts'
[debug] [iOS] Getting list of available contexts
[debug] [iOS] Retrieving contexts and views
[debug] [XCUITest] Selecting by url: false
[debug] [RemoteDebugger] Selecting application
[debug] [RemoteDebugger] Current applications available:
[debug] [RemoteDebugger] Application: 'PID:2527'
[HTTP] --> GET /wd/hub/session/381d990a-9003-42a9-996b-030c490ad215/contexts
[HTTP] {}
[debug] [W3C (381d990a)] Calling AppiumDriver.getContexts() with args: ["381d990a-9003-42a9-996b-030c490ad215"]
[debug] [XCUITest] Executing command 'getContexts'
[debug] [iOS] Getting list of available contexts
[debug] [iOS] Retrieving contexts and views
[debug] [XCUITest] Selecting by url: false
[debug] [RemoteDebugger] Sending connection key request
[debug] [RemoteDebugger] Sending '_rpc_reportIdentifier:' message (id: 1)
[debug] [RemoteDebugger] Sending to Web Inspector took 6ms
Checking for Perl...found Perl at /usr/bin/perl
Checking for HTTP client...found /usr/bin/wget -nv
[2020-05-22 09:10:57 UTC] [DEBUG] Memory is greater than 1024 MB, which should be sufficient.
[2020-05-22 09:10:57 UTC] [INFO] Started installation log in /root/virtualmin-install.log
[2020-05-22 09:10:57 UTC] [DEBUG] Phase 1 of 3: Setup
[2020-05-22 09:10:57 UTC] [DEBUG] Install mode: minimal
[2020-05-22 09:10:57 UTC] [DEBUG] Product: Virtualmin GPL
[2020-05-22 09:10:57 UTC] [DEBUG] install.sh version: 6.1.1
[2020-05-22 09:10:57 UTC] [DEBUG] Checking for fully qualified hostname...
[2020-05-22 09:10:57 UTC] [DEBUG] Setting hostname to s2.mydomain.com
#Uninstall old installation
sudo minikube delete --all=true --purge=true
sudo rm -rf ~/.kube
sudo rm -rf ~/.minikube
sudo rm -rf /var/lib/minikube
sudo rm -rf /var/lib/kubelet
sudo rm -rf /var/lib/localkube
sudo rm -rf /data/minikube
sudo rm -rf /var/lib/kubeadm.yaml
rm -rf .*kube
@trinhpham
trinhpham / gist:b24e74c4d5e1e141027f5ece838fe0b8
Last active December 12, 2020 17:46
NFS over GlusterFS
https://blogs.oracle.com/linux/migrate-nfs-to-glusterfs-and-nfs-ganesha
mkdir -p /data/gnfs
gluster volume create gnfs db1:/data/gnfs force
gluster volume start gnfs
gluster volume info gnfs
gluster volume status
gluster volume add-brick gnfs replica 2 db2:/data/gnfs force
mkdir /etc/ganesha/exports
@trinhpham
trinhpham / gist:b90f4b2741f01948f9165a13a0cfd986
Last active January 9, 2021 09:22
GlusterFS & NFS Ganesha on Centos 8
echo fastestmirror=1 >> /etc/dnf/dnf.conf
dnf update -y
dnf install centos-release-gluster centos-release-nfs-ganesha30 hostname -y
dnf install glusterfs-server nfs-ganesha nfs-ganesha-gluster -y
systemctl enable --now glusterd
mkdir -p /data/gnfs
@trinhpham
trinhpham / hello-ingress.yaml
Last active April 16, 2022 04:51
Kube Cluster deployment test
kind: Service
apiVersion: v1
metadata:
name: hello
labels:
app: hello
spec:
type: ClusterIP
ports:
- protocol: TCP
@trinhpham
trinhpham / update_mirror.sh
Created August 29, 2021 11:33
Update ubuntu mirror
#!/bin/bash
sudo sed -i 's/http\:\/\/security.ubuntu.com\/ubuntu/mirror\:\/\/mirrors.ubuntu.com\/mirrors.txt/' /etc/apt/sources.list
sudo sed -i 's/http\:\/\/extras.ubuntu.com\/ubuntu/mirror\:\/\/mirrors.ubuntu.com\/mirrors.txt/' /etc/apt/sources.list
sudo sed -i 's/http\:\/\/.*archive.ubuntu.com\/ubuntu/mirror\:\/\/mirrors.ubuntu.com\/mirrors.txt/' /etc/apt/sources.list