Skip to content

Instantly share code, notes, and snippets.

View jay's full-sized avatar
🇺🇸

Jay Satiro jay

🇺🇸
  • New Rochelle, New York, United States
View GitHub Profile
@jay
jay / checkout-curl-release.pl
Last active December 15, 2022 04:18
fetch and checkout a curl release from the canonical repo
#!/usr/bin/env perl
=begin comment
README
./checkout-curl-release.pl <"latest" | tag | version>
This script fetches and checks out the release tag marked as "latest" (or
a user-specified release tag or version) from the canonical curl repo on
github, and then modifies the curl/libcurl version includes to use the version
@jay
jay / GitHub-Ignore-Segoe-UI.css
Last active July 12, 2016 07:27
Revert some of GitHub's font changes made on 2016-07-11
@-moz-document domain("github.com") {
@font-face {
font-family: "Segoe UI";
font-weight: normal;
font-style: normal;
src: local("Arial");
}
@font-face {
@jay
jay / ListEasyHandles.c
Last active July 3, 2026 21:12
Use libcurl to add some easy handles to a multi handle, then list them.
/* Use libcurl to add some easy handles to a multi handle, then list them.
Usage: ListEasyHandles
This example has been superseded by curl_multi_get_handles().
curl-library mailing list thread:
'How to list easy handles from a multi handle'
https://curl.haxx.se/mail/lib-2016-06/0000.html
@jay
jay / PostUpload.c
Last active October 25, 2022 21:40
Use libcurl to upload POST data.
/* Use libcurl to upload POST data.
Usage: PostUpload <post_data_filename> <url>
Used this as a speed test in Win7 x64, see
https://github.com/curl/curl/issues/708
First test the speed in a web browser:
Go to https://testmy.net/mirror and choose the geographically closest mirror.
After the mirror is set click on 'Upload Test'.
@jay
jay / ReorderCipherList.c
Last active December 22, 2015 04:14
Use libcurl to retrieve URL via HTTP2 using a reordered cipher list.
/* Use libcurl to retrieve URL via HTTP2 using a reordered cipher list.
Usage: ReorderCipherList <url>
This program deprioritizes HTTP/2 blacklisted ciphers in the client cipher
list and then uses that reordered list in its client handshake with the server.
Note that according to HTTP/2 RFC 7540 the blacklist enforcement is described
using the RFC semantic 'MAY' which is the same as 'OPTIONAL'. In this code I
refer to the ciphers as just blacklisted or banned.
@jay
jay / ProxyTest.c
Last active April 21, 2019 05:19
Use libcurl to retrieve a file, using a proxy if specified, and write that file to disk with a filename based on the filename in the URL.
/* Use libcurl to retrieve a file, using a proxy if specified, and write that
file to disk with a filename based on the filename in the URL.
Usage: ProxyTest <proxy|""> <url>
"My goal is simply to download a requested file and have it land on my desktop
with that exact same name. "
curl-library mailing list thread:
'Compiling libcurl for https'
@jay
jay / ShowSSLInfo.c
Last active February 14, 2019 07:41
Use libcurl and OpenSSL to show SSL negotiated cipher and version.
/* Use libcurl and OpenSSL to show SSL negotiated cipher and version.
Usage: ShowSSLInfo
curl-library mailing list thread:
'CURLINFO_TLS_SESSION with OPENSSL returns SSL_CTX instead of SSL'
http://curl.haxx.se/mail/lib-2015-09/0127.html
Copyright (C) 2015 Jay Satiro <raysatiro@yahoo.com>
http://curl.haxx.se/docs/copyright.html
@jay
jay / extract_last_modified.pl
Last active June 16, 2017 17:35
Extract the name of the last modified firefox archive from input.
#!/usr/bin/env perl
=begin comment
README
Extract the name of the last modified firefox archive from input.
Which archive is most recent is determined only by comparing 'last modified'
timestamps, the versions are not compared.
@jay
jay / curl ubuntu (update installed release).txt
Last active August 7, 2026 05:09
Notes for building and installing curl and OpenSSL in Ubuntu 16 x64 LTS
###############################################################################
#
# This is for when we have to update the installed version of curl, libpsl,
# libssh2, nghttp2, openssl or zlib in Ubuntu 16 LTS. This is not a single
# script.
#
# https://gist.github.com/jay/d88d74b6807544387a6c
#
###############################################################################
@jay
jay / enablehttp2.pl
Last active February 7, 2025 17:57
Enable HTTP2 in libcurl's Visual Studio 2010+ project files.
#!/usr/bin/env perl
=begin comment
README
This script enables HTTP2 in libcurl's generated project files for legacy
versions of Visual Studio 2010 - 2013 in the projects/ directory.
You'll need to modify these in-script variables for the script to work: