Skip to content

Instantly share code, notes, and snippets.

root@packer-67d497be-b156-e8bb-9da2-7f817a1cf1f4:~# uname -p | root@packer-67d48378-fa1d-724b-b421-242ecd096f62:~# uname -p
x86_64 | aarch64
root@packer-67d497be-b156-e8bb-9da2-7f817a1cf1f4:~# lscpu | root@packer-67d48378-fa1d-724b-b421-242ecd096f62:~# lscpu
Architecture: x86_64 | Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit | CPU op-mode(s): 64-bit
Address sizes: 46 bits physical, 48 bits virtual |
Byte Order: Little Endian Byte Order: Little Endian
CPU(s): 16 CPU(s): 16
On-line CPU(s) list: 0-15 On-line CPU(s) list: 0-15
Vendor ID: GenuineIntel | Vendor ID: ARM
<?php
declare(strict_types=1);
// Print data structures necessary for finding grapheme cluster breaks
// https://unicode.org/reports/tr29/
function print_prop_table_for_url($prefix, $url, $filter, $prop_strip) {
$lines = explode("\n", trim(file_get_contents($url)));
$ranges = [];
foreach ($lines as $line) {
diff --git a/gmagick.c b/gmagick.c
index 5102a42..f86ac2f 100644
--- a/gmagick.c
+++ b/gmagick.c
@@ -258,22 +258,23 @@ static void php_gmagick_init_globals(zend_gmagick_globals *gmagick_globals)
// 10 is magick number, that seems to be enough.
gmagick_globals->shutdown_sleep_count = 10;
}
/* {{{ PHP_MINIT_FUNCTION(gmagick)
@adsr
adsr / knife.rb
Last active January 10, 2025 18:51
#!/opt/chef-workstation/embedded/bin/ruby --disable-gems
#--APP_BUNDLER_BINSTUB_FORMAT_VERSION=1--
require "rubygems"
# def require(f)
# puts format('in %s: require %s (%d)', Thread.current.backtrace[2], f, $:.length)
# super
# end
# this works around OpenSSL FIPS fingerprint matching issue where
@adsr
adsr / knife
Created January 10, 2025 18:29
#!/opt/chef-workstation/embedded/bin/ruby --disable-gems
#--APP_BUNDLER_BINSTUB_FORMAT_VERSION=1--
require "rubygems"
# def require(f)
# puts format('in %s: require %s (%d)', Thread.current.backtrace[2], f, $:.length)
# super
# end
# this works around OpenSSL FIPS fingerprint matching issue where
diff --git a/cookbooks/fb_apache/README.md b/cookbooks/fb_apache/README.md
index 40d6f0c..daff042 100644
--- a/cookbooks/fb_apache/README.md
+++ b/cookbooks/fb_apache/README.md
@@ -11,20 +11,21 @@ Attributes
* node['fb_apache']['sites'][$SITE][$CONFIG]
* node['fb_apache']['sysconfig'][$KEY]
* node['fb_apache']['sysconfig']['_extra_lines']
* node['fb_apache']['modules']
* node['fb_apache']['modules_directory']
diff --git a/include/http_core.h b/include/http_core.h
index 15c9bac524..036d62486b 100644
--- a/include/http_core.h
+++ b/include/http_core.h
@@ -1059,6 +1059,8 @@ AP_DECLARE(int) ap_state_query(int query_code);
#define AP_SQ_RM_CONFIG_TEST 3
/** only dump some parts of the config */
#define AP_SQ_RM_CONFIG_DUMP 4
+ /** rewrite test */
+#define AP_SQ_RM_REWRITE_TEST 5
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 1506e6fef4..91c885f58c 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -1277,6 +1277,7 @@ PHP_MINIT_FUNCTION(openssl)
OpenSSL_add_all_algorithms();
SSL_load_error_strings();
#else
+ OSSL_PROVIDER_load(NULL, "legacy");
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL);
diff --git a/termbox2.h b/termbox2.h
index a716dbd..0ec61e1 100644
--- a/termbox2.h
+++ b/termbox2.h
@@ -1816,7 +1816,12 @@ int tb_print_ex(int x, int y, uintattr_t fg, uintattr_t bg, size_t *out_w,
*out_w = 0;
}
while (*str) {
- str += tb_utf8_char_to_unicode(&uni, str);
+ if ((rv = tb_utf8_char_to_unicode(&uni, str)) == TB_ERR) {
diff --git a/config.m4 b/config.m4
index 521dfbb..b9dfa85 100644
--- a/config.m4
+++ b/config.m4
@@ -8,7 +8,7 @@ if test "$PHP_INJECTION" != "no"; then
LIBSYMBOL=libinjection_is_sqli
PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
[
- PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $INJECTION_DIR, INJECTION_SHARED_LIBADD)
+ LDFLAGS="$LDFLAGS $INJECTION_DIR/libinjection.a"