Skip to content

Instantly share code, notes, and snippets.

View EONRaider's full-sized avatar
💀
Start The World

EONRaider

💀
Start The World
  • Curitiba, Brazil
View GitHub Profile
@EONRaider
EONRaider / ptr_iter.c
Last active December 2, 2021 19:10
Iterating and modifying an array using pointers in C
#include <stdio.h>
#include <stdlib.h>
#define SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
void arr_iter(const short[], short);
void in_place_mod(short[], short, unsigned int);
int main(void) {
short numsArr[] = {1, 2, 3, 4};
Just a way to host my images...
@EONRaider
EONRaider / http_client.rs
Created December 14, 2022 21:08
A simple asynchronous HTTP client in Rust
// [dependencies]
// async-std = { version = "1.7.0", features = ["unstable"]}
// surf = "1.0.0"
pub async fn many_requests(urls: &[String]) -> Vec<Result<String, surf::Exception>> {
let client = surf::Client::new();
let mut handles = vec![];
for url in urls {
let request = client.get(&url).recv_string();