Skip to content

Instantly share code, notes, and snippets.

View khuongln-1346's full-sized avatar
🌴
On vacation

Lam Ngoc Khuong khuongln-1346

🌴
On vacation
View GitHub Profile
@khuongln-1346
khuongln-1346 / directory.ts
Created May 27, 2022 08:20 — forked from Alex4386/directory.ts
TypeScript (a.k.a. AnyScript) Implementation of Google Drive Navigator
/* eslint-disable @typescript-eslint/camelcase */
import { drive_v3 } from "googleapis";
import { GaxiosResponse } from "gaxios";
import mime from "mime";
import fs, { ReadStream } from "fs";
import File from "./file";
import path from "path";
import { escapeSingleQuotes } from "../util";
class Directory extends File {
@khuongln-1346
khuongln-1346 / clean.sh
Created April 19, 2022 15:41 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@khuongln-1346
khuongln-1346 / launch.json
Created January 20, 2022 02:28
launch.json example
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest watch current file",
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
"args": [
"${fileBasename}",
@khuongln-1346
khuongln-1346 / clean-up-boot-partition-ubuntu.md
Created March 9, 2020 16:20 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@khuongln-1346
khuongln-1346 / cw.js
Last active August 27, 2019 08:45
cw script
$('#_chatText').val(`
[To:2261529]
[To:2868244]
[To:3878185]
Em deploy lại tý ạ (bow)
`);
$('#_sendButton').click();
@khuongln-1346
khuongln-1346 / Jenkinsfile
Created June 27, 2019 01:51 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage c…
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8-alpine