Skip to content

Instantly share code, notes, and snippets.

View Mon-ius's full-sized avatar
🎯
Focusing

Monius Mon-ius

🎯
Focusing
View GitHub Profile
@Mon-ius
Mon-ius / proxy-chain-example.js
Created February 29, 2024 07:26 — forked from jancurn/proxy-chain-example.js
Example showing how to use the proxy-chain NPM package to let headless Chrome use a proxy server with username and password
const puppeteer = require('puppeteer');
const proxyChain = require('proxy-chain');
(async() => {
const oldProxyUrl = 'http://bob:password123@proxy.example.com:8000';
const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl);
// Prints something like "http://127.0.0.1:45678"
console.log(newProxyUrl);
use std::{
fs::File,
io::{Read, Write},
time::Instant,
};
use tokio::task::{self, JoinHandle};
async fn compute() {
let handles: Vec<JoinHandle<_>> = (0..1000)
.map(|_| {
@Mon-ius
Mon-ius / after.conf
Created March 10, 2024 05:29 — forked from Valinwolf/after.conf
NGINX Configs
# configuration file /etc/nginx/nginx.conf:
user apache apache;
worker_processes auto;
error_log /var/log/nginx/error.log;
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 4096;
}
[package]
name = "rddd"
version = "0.1.0"
edition = "2021"
[dependencies]
hyper = { version = "1.3.1", default-features = false, features = ["http2", "client"] }
hyper-util = { version = "0.1.3", features = ["client", "http2", "tokio"] }
tokio = { version = "1.37.0", default-features = false, features = ["rt", "fs"] }
tokio-rustls = { version = "0.26.0", default-features = false, features = ["ring", "tls12"] }
@Mon-ius
Mon-ius / bpf.c
Created November 26, 2024 08:49 — forked from 2opremio/bpf.c
Example of using bpf to capture packets in OSX
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <err.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
@Mon-ius
Mon-ius / _obsolete.md
Created May 7, 2025 15:25 — forked from Ghostbird/_obsolete.md
Build FFMPEG with NVIDIA hardware accelleration libraries on Debian 12. Includes non-free libnpp!

Obsolete

It is no longer necessary to use this script to have hardware acceleration in ffmpeg on Debian. The default Debian ffmpeg and dependencies now support this out of the box.

See: #gistcomment-5095112