Skip to content

Instantly share code, notes, and snippets.

@subfuzion
subfuzion / curl.md
Last active April 17, 2024 04:24
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@Mattemagikern
Mattemagikern / Certificates.go
Created May 9, 2019 08:31
Create x509 certificate chain using Golang. Root CA, Designated CA, server CA
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
"math/big"
@ctolsen
ctolsen / curl_to_ab.py
Last active May 15, 2022 16:19
"Copy to cURL" in Chrome to Apache Bench command
#!/usr/bin/env python3
import sys
import os
def curl_to_ab(curl_cmd: list, num: int=200, cur: int=4) -> str:
"""
Translate a cURL command created by Chrome's developer tools into a
command for ``ab``, the ApacheBench HTTP benchmarking tool.