Skip to content

Instantly share code, notes, and snippets.

View kevtainer's full-sized avatar
🚴‍♂️
zooooom!

Kevin Crawley kevtainer

🚴‍♂️
zooooom!
View GitHub Profile
@ogazitt
ogazitt / auth.go
Created April 14, 2020 05:53
Auth0 PKCE flow for a CLI built in golang
package auth
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"net/url"
@magnetikonline
magnetikonline / dumprequest.php
Last active July 18, 2024 19:50
PHP script to dump full HTTP request to file (method, HTTP headers and body).
<?php
// https://gist.github.com/magnetikonline/650e30e485c0f91f2f40
class DumpHTTPRequestToFile {
public function execute($targetFile) {
$data = sprintf(
"%s %s %s\n\nHTTP headers:\n",
$_SERVER['REQUEST_METHOD'],
$_SERVER['REQUEST_URI'],
$_SERVER['SERVER_PROTOCOL']