1. Install
brew install youtube-dl
brew install libav
2. Usage
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=jP7BDJwSobY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ex: rename file test.jpg?w=12&h=15 to test.jpg | |
| for FILE in *; do mv $FILE ${FILE%\?*}; done | |
| # tham khao: | |
| # https://unix.stackexchange.com/questions/33279/how-can-i-rename-multiple-files-by-removing-a-character-or-string | |
| # ${i%-*} matches the begining of the filename up to the last occurrence of the dash - | |
| # ${file##*-} matches the rest of the filename after the last occurrence of the dash - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| wget -i files.txt | |
| # ex: rename file test.jpg?w=12&h=15 to test.jpg | |
| for FILE in *; do mv $FILE ${FILE%\?*}; done | |
| # tham khao: | |
| # https://unix.stackexchange.com/questions/33279/how-can-i-rename-multiple-files-by-removing-a-character-or-string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl 'https://shopee.vn/api/v2/search_items/?by=pop&limit=50&match_id=78&newest=0&order=desc&page_type=search' -H 'referer: https://shopee.vn' -H 'if-none-match-: 55b03-17c6363e0b4e25bdbc200053b1096e1a' |
I hereby claim:
- I am nooptr on github.
- I am thangnv (https://keybase.io/thangnv) on keybase.
- I have a public key ASBNaxD5MW9_jkVOT9-TiPJ29QmNoTJPEgJ0r0tB-9e3ugo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install nginx | |
| git clone https://github.com/sergey-dryabzhinsky/nginx-rtmp-module.git | |
| sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev | |
| wget http://nginx.org/download/nginx-1.17.8.tar.gz | |
| tar -xf nginx-1.10.1.tar.gz | |
| cd nginx-1.10.1 | |
| ./configure --add-module=../nginx-rtmp-module --with-http_ssl_module --with-http_stub_status_module --prefix=/etc/nginx | |
| make -j 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Thứ thự load credentials sẽ như sau: | |
| 1. Load từ role IAM của Amazon EC2 | |
| 2. Load từ file (~/.aws/credentials) | |
| 3. Load từ biến môi trường | |
| 4. Load từ file json ở trên disk | |
| 5. Thông tin credential được định nghĩa trực tiếp trong file JS | |
| ==== | |
| Có 1 số cách có thể load được cấu hình IAM của aws vào trong nodejs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1. Import everything | |
| import { Wallet, BigNumber, ethers, providers } from 'ethers' | |
| const { FlashbotsBundleProvider, FlashbotsBundleResolution } = require('@flashbots/ethers-provider-bundle') | |
| /* | |
| Mainnet | |
| const provider = new providers.JsonRpcProvider('https://eth-mainnet.g.alchemy.com/v2/cmHEQqWnoliAP0lgTieeUtwHi0KxEOlh') | |
| const wsProvider = new providers.WebSocketProvider('wss://eth-mainnet.g.alchemy.com/v2/cmHEQqWnoliAP0lgTieeUtwHi0KxEOlh') | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Sender | |
| tar zcf - 16888_part2.sql | curl -T - https://ppng.io/nooptr | |
| ## Receiver | |
| curl https://ppng.io/nooptr | tar zxpf - -C . |
OlderNewer