I hereby claim:
- I am caocuong2404 on github.
- I am caocuong2404 (https://keybase.io/caocuong2404) on keybase.
- I have a public key ASAGrF4VukD9VsnSJP5qj06RR7uYU6zn9dG34kCltoVuwwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| sudo apt update | |
| sudo apt upgrade | |
| sudo sh -c "$(curl -fsSL https://starship.rs/install.sh)" -y -f | |
| echo 'eval "$(starship init bash)"' >> ~/.bashrc | |
| bash | |
| # backup files from a docker volume into /tmp/backup.tar.gz | |
| function docker-volume-backup-compressed() { | |
| docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie tar -czvf /backup/backup.tar.gz "${@:2}" | |
| } | |
| # restore files from /tmp/backup.tar.gz into a docker volume | |
| function docker-volume-restore-compressed() { | |
| docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie tar -xzvf /backup/backup.tar.gz "${@:2}" | |
| echo "Double checking files..." | |
| docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie ls -lh "${@:2}" |
| # | |
| # Powershell script for adding/removing/showing entries to the hosts file. | |
| # | |
| # Known limitations: | |
| # - does not handle entries with comments afterwards ("<ip> <host> # comment") | |
| # | |
| $file = "C:\Windows\System32\drivers\etc\hosts" | |
| function add-host([string]$filename, [string]$ip, [string]$hostname) { |
| # make dock faster | |
| defaults write com.apple.dock autohide-delay -float 0; killall Dock | |
| # install brew | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| (echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> ~/.zshrc | |
| zsh |
| <!-- MIT License --> | |
| <html> | |
| <head> | |
| <script> | |
| function generateKey(alg, scope) { | |
| return new Promise(function(resolve) { | |
| var genkey = crypto.subtle.generateKey(alg, true, scope) | |
| genkey.then(function (pair) { | |
| resolve(pair) | |
| }) |
| FROM nginx:alpine | |
| # https://thepracticalsysadmin.com/templated-nginx-configuration-with-bash-and-docker/ | |
| ENV LISTEN_PORT=80 \ | |
| NGINX_ENV=production \ | |
| SERVER_NAME=_ \ | |
| RESOLVER=8.8.8.8 \ | |
| UPSTREAM_API=api:3000 \ | |
| UPSTREAM_API_PROTO=http \ | |
| WORKDIR=/www \ |
https://www.nerdfonts.com/font-downloads
The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;
brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || true| // Configuration | |
| const CONFIG = { | |
| API_BASE_URL: "https://www.douyin.com/aweme/v1/web/aweme/post/", | |
| DEFAULT_HEADERS: { | |
| accept: "application/json, text/plain, */*", | |
| "accept-language": "vi", | |
| "sec-ch-ua": '"Not?A_Brand";v="8", "Chromium";v="118", "Microsoft Edge";v="118"', | |
| "sec-ch-ua-mobile": "?0", | |
| "sec-ch-ua-platform": '"Windows"', | |
| "sec-fetch-dest": "empty", |
| // ==UserScript== | |
| // @name Douyin Video Metadata Downloader | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Download videos and metadata from Douyin user profiles | |
| // @author CaoCuong2404 | |
| // @match https://www.douyin.com/user/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=douyin.com | |
| // @grant none | |
| // ==/UserScript== |