Skip to content

Instantly share code, notes, and snippets.

View chrstphrchvz's full-sized avatar
🕳️
I tend to disappear

Christopher Chavez chrstphrchvz

🕳️
I tend to disappear
  • San Antonio, TX
View GitHub Profile
@chrstphrchvz
chrstphrchvz / tkMacOSXRegion_excerpt.c
Created July 30, 2023 17:51
XEqualRegion() for Tk Aqua using __HIShapeEqual() using FindSymbol() hack
// FindSymbol() approach stolen from https://stackoverflow.com/a/21855885/4896937
// Adapted from:
// https://github.com/0xced/iOS-Artwork-Extractor/blob/master/Classes/FindSymbol.c
// Adapted from MoreAddrToSym / GetFunctionName()
// http://www.opensource.apple.com/source/openmpi/openmpi-8/openmpi/opal/mca/backtrace/darwin/MoreBacktrace/MoreDebugging/MoreAddrToSym.c
#include <mach-o/dyld.h>
#include <mach-o/nlist.h>
static void *FindSymbol(const struct mach_header *img, const char *symbol)
{
if ((img == NULL) || (symbol == NULL))
@chrstphrchvz
chrstphrchvz / gist:40b4af859a44f2f2efba2db370c2a10e
Created May 19, 2023 04:39
Unreported Tkinter test failure on Tk 8.7
(Not sure if this is actually due to 8.7)
======================================================================
FAIL: test_create_polygon (test.test_tkinter.test_widgets.CanvasTest.test_create_polygon)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/user/git/cpython/Lib/test/test_tkinter/test_widgets.py", line 861, in test_create_polygon
self.assertEqual(c.bbox(i1), (19, 9, 61, 51))
AssertionError: Tuples differ: (18, 8, 62, 52) != (19, 9, 61, 51)
@chrstphrchvz
chrstphrchvz / utf_string_conversions.ii
Created December 10, 2021 09:15
Preprocessor output for chromium/base/strings/utf_string_conversions.cc (from qtwebengine-chromium 87-based) with macOS 12 SDK. Compile with `clang++ -std=c++14 -stdlib=libc++ -c utf_string_conversions.ii`.
This file has been truncated, but you can view the full file.
# 1 "../../3rdparty/chromium/base/strings/utf_string_conversions.cc"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 405 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "../../3rdparty/chromium/base/strings/utf_string_conversions.cc" 2
@chrstphrchvz
chrstphrchvz / string16.ii
Created December 9, 2021 02:11
Preprocessor output for chromium/base/strings/string16.cc (from qtwebengine-chromium 87-based) with macOS 12 SDK. Compile with `clang++ -std=c++14 -stdlib=libc++ -c string16.ii`.
This file has been truncated, but you can view the full file.
# 1 "../../3rdparty/chromium/base/strings/string16.cc"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 405 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "../../3rdparty/chromium/base/strings/string16.cc" 2
@chrstphrchvz
chrstphrchvz / tcl.diff
Created November 17, 2018 13:01
tcl/tk 8.6.9rc4 vs 8.6.9 final (2018-11-16)
diff -r -u tcl8.6.9rc4/changes tcl8.6.9-final/changes
--- tcl8.6.9rc4/changes 2018-11-09 13:13:55.000000000 -0600
+++ tcl8.6.9-final/changes 2018-11-16 12:40:53.000000000 -0600
@@ -8891,4 +8891,6 @@
2018-11-09 (bug)[35a8f1] overlong string length of some lists (owens)
+2018-11-16 (bug)[00d04c] Repair [binary encode base64] (sebres)
+
- Released 8.6.9, November 16, 2018 - details at http://core.tcl-lang.org/tcl/ -
@chrstphrchvz
chrstphrchvz / tcl869rc4-tests.log
Created November 13, 2018 01:45
Tcl/Tk 8.6.9rc4 build and test logs
---> Fetching distfiles for tcl
---> Verifying checksums for tcl
---> Checksumming tcl8.6.9rc4-src.tar.gz
---> Extracting tcl
---> Extracting tcl8.6.9rc4-src.tar.gz
Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_lang_tcl/tcl/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/tcltk/tcl8.6.9rc4-src.tar.gz' | /usr/bin/tar -xf -
---> Configuring tcl
Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_lang_tcl/tcl/work/tcl8.6.9/unix" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --enable-threads tcl_cv_type_64bit="long long"
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
@chrstphrchvz
chrstphrchvz / patch-Makefile.PL.diff
Created November 9, 2018 07:05
new patch-Makefile.PL.diff for Tcl::Tk 1.27+
--- Makefile.PL.orig 2018-07-29 04:33:53.000000000 -0500
+++ Makefile.PL 2018-11-09 00:55:20.000000000 -0600
@@ -37,44 +37,6 @@
}
-open TCLSH, "$tclsh test-for-tk.tcl|";
-my $res = join '', <TCLSH>;
-
-unless ($res =~ /^ok1/m) {

Static withdraw address implementation proposal

Database

Presumably, this is where the static withdraw address for each user is stored, along with existing user information. Something like ALTER TABLE will be issued to extend the existing database with at least the two new columns:

  • a value e.g. static_withdraw_address_is_configured (or something more concise) indicating whether the user has configured a static withdraw address, stored as a Boolean (or similar) and initialized to false for all users
  • a value e.g. withdraw_address to hold the user-configured static withdraw address, stored as CHAR(34) (same type as existing address column) and uninitialized by default (it is not to be accessed unless the static_withdraw_address_is_configured). Or, if the datatype has a reliable way for indicating it is uninitialized/invalid, that may be used instead creating the static_..._is_configured column, particularly if doing so is more convenient.

The README.md will need to be updated to add thes

@chrstphrchvz
chrstphrchvz / falkon.log
Created June 27, 2018 13:08
MacPorts build log for falkon 3.0.1 on macOS 10.13.5
This file has been truncated, but you can view the full file.
---> Computing dependencies for falkon.
---> Fetching distfiles for falkon
---> Verifying checksums for falkon
---> Checksumming falkon-3.0.1.tar.xz
---> Extracting falkon
---> Extracting falkon-3.0.1.tar.xz
Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_kde_falkon/falkon/work" && /opt/local/bin/xz -dc '/opt/local/var/macports/distfiles/falkon/falkon-3.0.1.tar.xz' | /usr/bin/tar -xf -
---> Applying patches to falkon
---> Applying patch-mac-macdeploy.sh.diff
Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_kde_falkon/falkon/work/falkon-3.0.1" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/github.com/macports/macports-ports/kde/falkon/files/patch-mac-macdeploy.sh.diff'
@chrstphrchvz
chrstphrchvz / main.log
Created June 14, 2018 19:46
WIP Falkon install logfile
This file has been truncated, but you can view the full file.
version:1
:debug:sysinfo macOS 10.13 (darwin/17.6.0) arch i386
:debug:sysinfo MacPorts 2.5.2
:debug:sysinfo Xcode 9.4
:debug:sysinfo SDK 10.13
:debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 10.13
:debug:main epoch: in tree: 0 installed: 0
:debug:main xz 5.2.4_0 exists in the ports tree
:debug:main xz 5.2.4_0 is the latest installed
:debug:main xz 5.2.4_0 is active