(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
//Program.cs file |
[package] | |
name = "crawler" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
tl = "0.7.7" | |
reqwest = { version = "0.11.18", features = ["gzip"] } |
[package] | |
name = "crawler" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
tl = "0.7.7" | |
reqwest = { version = "0.11.18", features = ["gzip"] } |
#[tokio::main] | |
async fn main() -> anyhow::Result<()> { | |
let http_client = build_http_client()?; | |
// Note that the code is incomplete here | |
Ok(()) | |
} | |
fn build_http_client() -> reqwest::Result<reqwest::Client> { | |
let client_builder = reqwest::ClientBuilder::new().gzip(true); | |
let client = client_builder.build(); |
#[tokio::main] | |
async fn main() -> anyhow::Result<()> { | |
let http_client = build_http_client()?; | |
//we are searching for the word "access" here. | |
let html = http_client.get("http://tratu.coviet.vn/hoc-tieng-anh/tu-dien/lac-viet/A-V/access.html") | |
.send().await? | |
.text_with_charset("utf-8").await?; | |
dbg!(html); |
async fn main() -> anyhow::Result<()> { | |
let http_client = build_http_client()?; | |
//we are searching for the word "access" here. | |
let html = http_client | |
.get("http://tratu.coviet.vn/hoc-tieng-anh/tu-dien/lac-viet/A-V/access.html") | |
.send() | |
.await? | |
.text_with_charset("utf-8") | |
.await?; |
Luv Cún!!! |
#!/bin/bash | |
sudo su | |
sudo apt-get update -y && sudo apt-get upgrade -y | |
sudo apt-get install neovim -y | |
sudo apt-get install wireguard-tools -y | |
cd /etc/wireguard | |
touch wg0.conf | |
wg genkey > privatekey | |
wg pubkey < privatekey > publickey |
function Invoke-Starship-PreCommand { | |
$loc = $executionContext.SessionState.Path.CurrentLocation; | |
$prompt = "$([char]27)]9;12$([char]7)" | |
if ($loc.Provider.Name -eq "FileSystem") | |
{ | |
$prompt += "$([char]27)]9;9;`"$($loc.ProviderPath)`"$([char]27)\" | |
} | |
$host.ui.Write($prompt) | |
} |