Skip to content

Instantly share code, notes, and snippets.

Avatar

Patrick Allaert patrickallaert

View GitHub Profile
@patrickallaert
patrickallaert / gist:a8f9c508030586b09833b909caffd684
Created Nov 24, 2021
Compiling error of PHP 8.1.0 on 32 bit architecture
View gist:a8f9c508030586b09833b909caffd684
make_x86_64_sysv_elf_gas.S: Assembler messages:
make_x86_64_sysv_elf_gas.S:34: Error: bad register name `%rdi'
make_x86_64_sysv_elf_gas.S:37: Error: bad register name `%rax'
make_x86_64_sysv_elf_gas.S:41: Error: bad register name `%rax)'
make_x86_64_sysv_elf_gas.S:45: Error: bad register name `%rdx'
make_x86_64_sysv_elf_gas.S:48: Error: bad register name `%rax)'
make_x86_64_sysv_elf_gas.S:50: Error: bad register name `%rax)'
make_x86_64_sysv_elf_gas.S:53: Error: bad register name `%rip)'
make_x86_64_sysv_elf_gas.S:56: Error: bad register name `%rcx'
make_x86_64_sysv_elf_gas.S:59: Error: bad register name `%rip)'
View php-8.1.0.manifest
php-8.1.0.tar.bz2
SHA256 hash: 0725ed2baea125496a898455d501a77460218b2a0cfad773fa9322f491b82b61
PGP signature:
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE8faSI4+8FmblpczUGZ+d/vb/uv0FAmGdObkACgkQGZ+d/vb/
uv2zAhAAh8XwQSAMOM86xbcTScnAyhHSSTtujaCH/vUMOEsdE1a/fc0a0lAwW4T1
/IFF/0+GLpOBq827KtG8DrklNBnnc3wOwGWrBu55timNWuT5vuwFuOqExf2Nrlw3
Pxz1rQ1CbCkEsBr8gF74/Tw5MS8fay+Oq0FXqHPLfL/8/oBBmpPsddR/0ycFB7PP
K1OVnpRwfq3UanVOUxOQxfsR86sGsldNn6y8iv2N2D/Mq8Qxjeu1ZAy34gwytUW3
View php-8.1.0RC5.manifest
php-8.1.0RC5.tar.bz2
SHA256 hash: e07c84e1b11282df8d3b2a5d27835278445bb7419cea5bbf497fbca52bdf27fd
PGP signature:
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE8faSI4+8FmblpczUGZ+d/vb/uv0FAmF4m8kACgkQGZ+d/vb/
uv0R6A/+PtieD52u4N2Tdv/dqoJBUUlad/LmJS6QGbCnfJFGsHby9cK+eSvInJ9I
JTvEY5E1/i1PAUS0jOwahoxhRihdmNcqERC4nduQWhn3BXIZZCjcAm/+HAYdZndI
MnFc8aRxOTT3zQNgEFdrgtkxdCaXnUmNCaV5W1gx9aLZTnsdlYidxH3x3GrASUoW
qxvrODckFK+CkAQ/dwjXEmBJJl+TmRVe5Mt2RDW/dXFxB6VcxCBlTKDBTOYxllAO
View php-8.1.0RC2.manifest
php-8.1.0RC2.tar.bz2
SHA256 hash: cae9b3f00693e467736aec930676cf5cf71da87b50114a3597de502980d29a4c
PGP signature:
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE8faSI4+8FmblpczUGZ+d/vb/uv0FAmFAy7MACgkQGZ+d/vb/
uv14bhAAlKBhbp6dHeOoaKN2udMLLe7QvYkeUSktEzz6gtRmGF5sWd4NEm7Tv233
B1jrwIiNiixG9PTrwMb+0k9IEJbjcpLxEdDPIX17kXp8fjROlWMhaRtUzSHfgRaM
1flRSHnEQ8Vbk9zL2IiuTHLAdBOlPwkaZuavXt+6i8HZ5aX/nWULSWkfNpjkg3oT
QwdCkg9AS/0HKUrf0zW3L9C5kghYxG0O7bflnrc/XBlKFf6BIggDJxdCuoUAgroj
View php-8.1.0RC1.manifest
php-8.1.0RC1.tar.bz2
SHA256 hash: 794b7cd222fb38f22a42413595089b78eb2e9f03e863829dc6dde8c8582a3bab
PGP signature:
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE8faSI4+8FmblpczUGZ+d/vb/uv0FAmEveSgACgkQGZ+d/vb/
uv1T7RAAoLs9a6Z2FFWNUgsmh+sAXy8v4sRAgkd4WFBgqDpy8WTkkDXZbx6J/TmQ
fl2vZ+bnj/Zhbk8Liy/H2wDf0VwWxkIui/bxWff5xBjEp5inFbt5NgQiituxCU35
kQpBUlrgvNEx4TnJapfnqyhCLaMFu2yYai+3jB0eYQ7uUTUiQFIVZLLGF9+xA2Lt
5Cw4u8ixjNLx7wkRpZ/Y+HDkgV6m0fYETi65qy/JtPHWr08ux3wqLohovmwJVMnA
@patrickallaert
patrickallaert / gist:9ebb69f3dba393e0c7f0f553ed16d8b7
Created Jun 22, 2021
Signatures/hashes for php-8.1.0alpha2
View gist:9ebb69f3dba393e0c7f0f553ed16d8b7
php-8.1.0alpha2.tar.bz2
SHA256 hash: d19be34a14f0472199cccb33b43addbec9a271c427c1db8c98544464fd8b95ee
PGP signature:
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE8faSI4+8FmblpczUGZ+d/vb/uv0FAmDSFqsACgkQGZ+d/vb/
uv0ZQQ//Z6y32sNPQppIQecOtFzcrBgTGZm7ShNLP9yTHJvvirTnzBgZsdS89imu
NPBxFJxuT8i1gijxEMDTVnzxgS3wLgY/l+Tic57b8OV1O2BMJzYTAPbOIQ129dl/
6eosBpAErRqb0d2xlplUFg817GwfvVkhm7KbqNLwRy9DfnacMn5zVQE5XwI7LOJt
CIc1Er0Koo48s57uEIfffMOiqUodoR9yV4FL5TXcqAbyvEIDk/htMEY6+X2IlfwF
@patrickallaert
patrickallaert / HOWTO.md
Last active Sep 16, 2020
Integrate Phan in PHPStom
View HOWTO.md

HOWTO

  1. Install Phan in your project using Composer, it should create the script vendor/bin/phan, otherwise install it the way you want and hack the run-phan script.
  2. Install script run-phan (see at the bottom of this page) on your system (I decided to put it at /usr/local/bin/run-phan).
  3. In PHPStorm, go in Settings > Tools > External Tools, add a new tool and provide the parameters:
    • Program: /usr/local/bin/run-phan
    • Working directory: $ProjectFileDir$
    • Check "Open console for tool output"
    • Output filters: $FILE_PATH$:$LINE$
  4. You can now use it from Tools > External Tools > Phan (or assign it a shortcut)
@patrickallaert
patrickallaert / example.html
Created Feb 12, 2020
Example of image gallery
View example.html
<section class="images">
<a href="/image/a">
<picture>
<source srcset="/thumbnail/a.webp" type="image/webp"/>
<source srcset="/thumbnail/a.jpg" type="image/jpeg"/>
<img alt="" src="/thumbnail/a.jpg"/>
</picture>
</a>
<a href="/image/b">
<picture>
View gist:c08c76f2718ed8856af43587fc57a201
Installed Packages
acl.x86_64 2.2.53-1.el8 @ubi-8-baseos
apr.x86_64 1.6.3-9.el8 @ubi-8-appstream
apr-util.x86_64 1.6.1-6.el8 @ubi-8-appstream
apr-util-bdb.x86_64 1.6.1-6.el8 @ubi-8-appstream
apr-util-openssl.x86_64 1.6.1-6.el8 @ubi-8-appstream
audit-libs.x86_64 3.0-0.10.20180831git0047a6c.el8 @System
basesystem.noarch 11-5.el8 @System
bash.x86_64 4.4.19-7.el8 @System
brotli.x86_64 1.0.6-1.el8 @System
@patrickallaert
patrickallaert / script.js
Created Feb 25, 2019
defer image loading
View script.js
document.addEventListener("DOMContentLoaded", function() {
const srcDeferAttribute = "data-defer";
const srcBackingAttribute = "data-deferred";
document.querySelectorAll("*[" + srcDeferAttribute + "]").forEach(function(lazyImage) {
if (!lazyImage.complete) {
lazyImage.setAttribute(srcBackingAttribute, lazyImage.getAttribute("src"));
lazyImage.setAttribute("src", "data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=");
}
lazyImage.removeAttribute(srcDeferAttribute);