This file contains 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
def compound_unicode(unicode_str): | |
""" | |
Chuyển đổi chuỗi Unicode Tổ Hợp sang Unicode Dựng Sẵn | |
Edited from: `https://gist.github.com/redphx/9320735` | |
""" | |
unicode_str = unicode_str.replace("\u0065\u0309", "\u1EBB") # ẻ | |
unicode_str = unicode_str.replace("\u0065\u0301", "\u00E9") # é | |
unicode_str = unicode_str.replace("\u0065\u0300", "\u00E8") # è | |
unicode_str = unicode_str.replace("\u0065\u0323", "\u1EB9") # ẹ | |
unicode_str = unicode_str.replace("\u0065\u0303", "\u1EBD") # ẽ |
This file contains 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
package main | |
import ( | |
"fmt" | |
"github.com/ethereum/go-ethereum/accounts" | |
"github.com/ethereum/go-ethereum/common/hexutil" | |
"github.com/ethereum/go-ethereum/crypto" | |
) |
This file contains 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
## AWS | |
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories | |
http://169.254.169.254/latest/user-data | |
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME] | |
http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME] | |
http://169.254.169.254/latest/meta-data/ami-id | |
http://169.254.169.254/latest/meta-data/reservation-id | |
http://169.254.169.254/latest/meta-data/hostname | |
http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key |
This file contains 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
const ipfs = require("nano-ipfs-store").at("https://ipfs.infura.io:5001"); | |
(async () => { | |
const doc = JSON.stringify({ | |
foo: "bar", | |
tic: "tac" | |
}); | |
const cid = await ipfs.add(doc); |
This file contains 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
# 2017-10-01T14:14:44+00:00 | |
108.175.32.0/20 | |
108.175.34.0/24 | |
108.175.35.0/24 | |
192.173.64.0/18 | |
198.38.100.0/24 | |
198.38.101.0/24 | |
198.38.108.0/24 | |
198.38.109.0/24 |
This file contains 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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains 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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |