Skip to content

Instantly share code, notes, and snippets.

import argparse
import resource
import aiohttp
import aiodns
import asyncio
from collections import Counter
import datetime
@vestingz
vestingz / httpie-0x0.md
Last active January 25, 2023 23:06
HTTPie for 0x0

Post file

http -f https://envs.sh file@/path/to/file.xyz

Post remote URL

http -f https://envs.sh url=https://domain.xyz/file.abc

Post from STDIN

echo supdawg | http -f --ignore-stdin https://envs.sh file@/file/stdin

Shorten URL

@krnlde
krnlde / promisify-http.js
Last active February 22, 2023 03:42
util.promisify.custom and http.get example
const http = require('http');
const {promisify} = require('util');
http.get[promisify.custom] = function getAsync(options) {
return new Promise((resolve, reject) => {
http.get(options, (response) => {
response.end = new Promise((resolve) => response.on('end', resolve));
resolve(response);
}).on('error', reject);
});
@mosquito
mosquito / README.md
Last active November 14, 2024 08:39
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/[email protected]. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service