Skip to content

Instantly share code, notes, and snippets.

@harr1424
harr1424 / hash_svc.rs
Last active April 2, 2024 12:31
Rust web-service to download and hash remote images
use std::{
sync::{Arc, Mutex},
time::Duration,
fs::read_to_string,
};
use actix_web::{get, web, App, HttpServer, HttpResponse};
use reqwest;
use sha2::{Digest, Sha256};
use serde_derive::Deserialize;
use tokio::{
@harr1424
harr1424 / DbSeeder.cs
Created November 9, 2023 23:52
Programmatically Seeding Large Amounts of Data using EFCore 7.0
using System.Reflection;
using Blog.Models;
using Newtonsoft.Json;
namespace Blog.Data;
public class DbSeeder
{
private readonly PostContext _postContext;