Skip to content

Instantly share code, notes, and snippets.

@Mattemagikern
Mattemagikern / Certificates.go
Created May 9, 2019
Create x509 certificate chain using Golang. Root CA, Designated CA, server CA
View Certificates.go
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
"math/big"
@subfuzion
subfuzion / curl.md
Last active Aug 12, 2020
curl POST examples
View curl.md

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.

@ctolsen
ctolsen / curl_to_ab.py
Last active Jul 20, 2020
"Copy to cURL" in Chrome to Apache Bench command
View curl_to_ab.py
#!/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.
You can’t perform that action at this time.