Skip to content

Instantly share code, notes, and snippets.

@VirtualPirate
VirtualPirate / Cargo.toml
Created November 7, 2024 13:00
This is a rust program that downloads a file in multi segments. Making multiple connections to the url, download all the segments in parallel and merge the downloaded segments to the final file
[package]
name = "multipart-downloader"
version = "0.1.0"
edition = "2021"
[dependencies]
reqwest = { version = "0.12.9", features = ["json", "stream"] }
tokio = { version = "1", features = ["full"] }
futures = "0.3"
@VirtualPirate
VirtualPirate / multisegment-downloader.ts
Last active January 7, 2025 14:25
This is a script that downloads a file using multi-segmentation. Making multiple connections to the url and downloading the file in segments and then merges all the downloaded data after download is completed
import axios from "axios";
import * as fs from "node:fs";
import * as path from "node:path";
interface DownloadSegment {
start: number;
end: number;
index: number;
}
@VirtualPirate
VirtualPirate / bull-board-module.ts
Last active April 3, 2024 08:23 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL
import { BullMQAdapter } from "@bull-board/api/bullMQAdapter";
import { ExpressAdapter } from "@bull-board/express";
import { BullBoardModule } from "@bull-board/nestjs";
import { BullModule } from "@nestjs/bullmq";
import { Module } from "@nestjs/common";
import { ConfigModule, ConfigService } from "@nestjs/config";
import { FinlensQueue, FinlensRedisDb, Validator } from "@authlayer/core";
import { envSchema } from "../helpers/env-schema";