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 / ShowGmailFolders.c
Last active January 6, 2026 04:10
Use libcurl to retrieve Gmail folders and labels via IMAP over SSL (IMAPS).
/* Use libcurl to retrieve Gmail folders and labels via IMAP over SSL (IMAPS).
Usage: ShowGmailFolders <username> <password>
curl-library mailing list thread:
'Re: DL curl 7.35 mingw32'
http://curl.haxx.se/mail/lib-2015-05/0037.html
Note: When you attempt to login to Gmail via IMAP they sometimes require a
web login first for security reasons. In that case an error will be shown. Such
@jay
jay / curl ubuntu (update installed release).txt
Last active October 16, 2025 02:02
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 / PostJSON.c
Last active May 15, 2025 23:22
Use libcurl to POST JSON data.
/* Use libcurl to POST JSON data.
Usage: PostJSON <name> <value>
curl-library mailing list thread:
'how do i post json to a https ?'
https://curl.haxx.se/mail/lib-2015-01/0049.html
* Copyright (C) 2015 Jay Satiro <raysatiro@yahoo.com>
https://curl.haxx.se/docs/copyright.html
@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:
@jay
jay / remove-wolfssl-config.pl
Last active November 1, 2024 17:43
This script removes wolfSSL configurations from the legacy Visual Studio curl projects in the projects directory.
#!/usr/bin/env perl
=begin comment
README
This script removes wolfSSL configurations from the legacy Visual Studio
curl projects in the projects directory.
Copyright (C) 2024 Jay Satiro <raysatiro@yahoo.com>
https://curl.se/docs/copyright.html
@jay
jay / test-RtlGetNtVersionNumbers.c
Last active March 22, 2024 22:06
test of GetVersionExW, RtlGetVersion and RtlGetNtVersionNumbers on Windows 11.
/*
test of GetVersionExW, RtlGetVersion and RtlGetNtVersionNumbers on Windows 11.
can be built with cygwin/mingw/mingw-w64 gcc or microsoft cl.
https://cygwin.com/pipermail/cygwin/2024-March/255728.html
---
without manifest:
@jay
jay / Test-DLL-atexit-handler
Last active March 12, 2024 13:23
Test whether or not a DLL's atexit handler is called on FreeLibrary
@jay
jay / getaddrinfo.c
Last active February 19, 2024 20:42
Use getaddrinfo to retrieve addresses the same way libcurl does.
/* Use getaddrinfo to retrieve addresses the same way libcurl does.
Usage: getaddrinfo [-u] [-4|-6] [--] <host> [service|port]
curl bug report:
'Cannot resolve named proxy host when configured with async DNS'
https://github.com/curl/curl/issues/12955
* Copyright (C) 2024 Jay Satiro <raysatiro@yahoo.com>
https://curl.se/docs/copyright.html
@jay
jay / hooktest2.cpp
Last active November 24, 2023 21:43
Monitor *raw* mouse buttons and keypresses in Windows
/* hooktest2
Monitor *raw* mouse buttons, keypresses, everything but MOUSEMOVE via low level
mouse and keyboard hooks. I wrote this to help identify some bugs in Chrome and
software running on Dell laptops.
The program will exit when the caps lock key is pressed. You can change that in
the LowLevelKeyboardProc function.
g++ -Wall -o hooktest2 hooktest2.cpp && hooktest2
@jay
jay / ListEasyHandles.c
Last active August 29, 2023 07:14
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
curl-library mailing list thread:
'How to list easy handles from a multi handle'
https://curl.haxx.se/mail/lib-2016-06/0000.html
* Copyright (C) 2016 Jay Satiro <raysatiro@yahoo.com>
https://curl.se/docs/copyright.html