This tutorial has been tested on Ubuntu 20.04 LTS.
Before install, don't forget to update package index in your server.
sudo apt update
// You can simply use response.data.pipe and fs.createWriteStream to pipe response to file | |
const axios = require('axios') | |
// Example 1: | |
axios({ | |
method: "get", | |
url: "https://xxx/my.pdf", | |
responseType: "stream" | |
}).then(function (response) { | |
response.data.pipe(fs.createWriteStream("/temp/my.pdf")) |
# Make sure MySQL is not running | |
sudo systemctl stop mysql | |
# Then purge all of the MySQL packages | |
sudo apt purge mysql-server mysql-client mysql-common mysql-server-core-* mysql-client-core-* | |
# Then delete all of the MySQL files | |
sudo rm -rf /etc/mysql /var/lib/mysql /var/log/mysql | |
# Finally clean all packages that are not needed: |
#!/bin/sh | |
IP=$(echo $1 | egrep -o "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$") | |
if [ ! $IP ] | |
then | |
echo "Usage: generate-ip-cert.sh 127.0.0.1" | |
exit 1 | |
fi |
node_modules | |
npm-debug.log | |
Dockerfile* | |
docker-compose* | |
.dockerignore | |
.git | |
.gitignore | |
README.md | |
LICENSE | |
.vscode |
def get_country_flag(country_code): | |
OFFSET = 127397 | |
codepoints = tuple(ord(char) + OFFSET for char in country_code.upper()) | |
return chr(codepoints[0]) + chr(codepoints[1]) | |
# usage get_country_flag("ID") |
#!/bin/bash | |
# get UTC date | |
date -u -d "$(curl -sI google.com | grep -i '^date:' | cut -d' ' -f2-)" | |
# get local date from UTC | |
date -d "$(curl -sI google.com| grep -i '^date:'|cut -d' ' -f2-)" | |
# sync local date from UTC | |
sudo date -s "$(date -d "$(curl -sI google.com | grep -i '^date:' | cut -d' ' -f2-)" '+%Y-%m-%d %H:%M:%S')" |
LOAD DATA LOCAL INFILE 'g:\\temp\\file1.csv' | |
INTO TABLE mytable | |
FIELDS TERMINATED BY ';' -- Pemisah kolom dalam file CSV | |
ENCLOSED BY '"' -- Karakter penutup untuk kolom yang diapit oleh tanda kutip ("") | |
LINES TERMINATED BY '\r\n' -- Karakter akhir baris dalam file CSV | |
IGNORE 1 LINES -- Mengabaikan baris header pertama dalam file CSV (jika ada) | |
-- Kolom target dalam tabel | |
(COL1, COL2, COL3, COL4, COL5); |
I hereby claim:
To claim this, I am signing this object: