Skip to content

Instantly share code, notes, and snippets.

View sptndc's full-sized avatar
🙏
I may be slow to respond.

sptndc

🙏
I may be slow to respond.
View GitHub Profile
@sptndc
sptndc / php-intl.patch
Created October 19, 2018 22:40
Patch for PHP intl
Index: ext/intl/grapheme/grapheme_string.c
===================================================================
--- ext/intl/grapheme/grapheme_string.c (revisión: 311981)
+++ ext/intl/grapheme/grapheme_string.c (copia de trabajo)
@@ -665,7 +665,7 @@
/* }}} */
/* {{{ grapheme_extract_charcount_iter - grapheme iterator for grapheme_extract MAXCHARS */
-inline int32_t
+static inline int32_t
@sptndc
sptndc / php-bison.patch
Created October 20, 2018 08:53
Patch for PHP fix bison check
diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4
index 7fa8c99..0375c9c 100644
--- a/Zend/acinclude.m4
+++ b/Zend/acinclude.m4
@@ -9,7 +9,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[
# non-working versions, e.g. "3.0 3.2";
# remove "none" when introducing the first incompatible bison version an
# separate any following additions by spaces
- bison_version_exclude="3.0"
+ bison_version_exclude="3.0.0"
@sptndc
sptndc / libxml29_compat.patch
Created October 21, 2018 06:20
PHP patch for libxml2-2.9
--- ext/dom/node.c 2012-08-06 17:49:48.826716692 +0800
+++ ext/dom/node.c 2012-08-06 17:52:47.633484660 +0800
@@ -1895,9 +1895,17 @@ static void dom_canonicalization(INTERNA
RETVAL_FALSE;
} else {
if (mode == 0) {
+#ifdef LIBXML2_NEW_BUFFER
+ ret = xmlOutputBufferGetSize(buf);
+#else
ret = buf->buffer->use;
@sptndc
sptndc / xp_ssl.c.patch
Created October 21, 2018 06:22
PHP patch for OpenSSL
--- ext/openssl/xp_ssl.c 2015-10-07 17:19:55.710935804 -0300
+++ ext/openssl/xp_ssl.c 2015-10-07 17:23:12.723383144 -0300
@@ -332,10 +332,12 @@
sslsock->is_client = 1;
method = SSLv23_client_method();
break;
+#ifndef OPENSSL_NO_SSL2
case STREAM_CRYPTO_METHOD_SSLv2_CLIENT:
sslsock->is_client = 1;
method = SSLv2_client_method();
@sptndc
sptndc / whatsappEmojiMapper.js
Last active March 13, 2020 02:17
Whatsapp Emoji Mapper
const axios = require('axios')
const cheerio = require('cheerio')
const fs = require('fs')
const path = require('path')
const emojiList = {}
let key, value
axios.get('https://emojipedia.org/whatsapp/').then(response => {
if (response.status === 200) {
const $ = cheerio.load(response.data)