Skip to content

Instantly share code, notes, and snippets.

View vstm's full-sized avatar

Stefan Vetsch vstm

View GitHub Profile
@vstm
vstm / psalm-bin-dir-issue.md
Created December 24, 2021 12:58
psalm / composer 2.2 / bin-dir issue
psalm-bin-test composer about
Composer - Dependency Manager for PHP - version 2.2.1
Composer is a dependency manager tracking local dependencies of your projects and libraries.
See https://getcomposer.org/ for more information.psalm-bin-test cat > composer.json 
{
    "name": "vstm/psalm-bin-test",
    "require-dev": {
        "vimeo/psalm": "dev-master"
FROM node:10
RUN useradd -m circleci
USER circleci
RUN npm set unsafe-perm true
RUN npm install -g '@oresoftware/r2g@0.0.132'

Keybase proof

I hereby claim:

  • I am vstm on github.
  • I am vstm (https://keybase.io/vstm) on keybase.
  • I have a public key whose fingerprint is 3D41 84BA F788 E330 3C29 7AE3 C6D6 ECA1 90EB 4289

To claim this, I am signing this object:

@vstm
vstm / gist:12cb0b79462e254b7d5c
Last active January 23, 2024 22:06
Debug wp_oembed-problems
<?php
require_once("wp-load.php");
add_action('http_api_debug', 'test_http_api_debug', 10, 5);
add_filter('oembed_remote_get_args', 'test_oembed_remote_get_args', 10, 2);
add_filter('oembed_fetch_url', 'test_oembed_fetch_url', 10, 3);
$embed_code = wp_oembed_get('http://vimeo.com/75343493');
@vstm
vstm / gist:8656784
Created January 27, 2014 20:35
gdb power user
break HPHP::UnitEmitter::recordSourceLocation
command 1
if m_pceVec.size() > 0 && m_pceVec[0]->m_methods.size() > 0 && m_pceVec[0]->m_methods[0]->m_params.size() > 0
set $phpCodeAddr = &m_pceVec[0]->m_methods[0]->m_params[0].m_phpCode
watch *$phpCodeAddr
break std::__uninitialized_move_if_noexcept_a<std::pair<int, HPHP::SourceLoc>*, std::pair<int, HPHP::SourceLoc>*, std::allocator<std::pair<int, HPHP::SourceLoc> > > if __result < $phpCodeAddr && (__result + (__last - __first)) > $phpCodeAddr
disable 1
else
cont
end
@vstm
vstm / gist:7808570
Created December 5, 2013 16:30
Crazy idea for pluggable SAPI tests for slash-lang.
diff --git a/Makefile b/Makefile
index 1e3c4b9..204f338 100644
--- a/Makefile
+++ b/Makefile
@@ -16,8 +16,9 @@ OBJS+=src/class.o src/error.o src/method.o src/object.o src/dispatch.o \
src/unicode.o src/lib/gc.o src/lib/buffer.o src/lib/slash.o src/data.o
SAPIS=$(shell ls -F sapi | grep "/" | sed -e 's/\///')
+SAPI_TESTS=$(patsubst sapi/%/Makefile,sapi[%]-test,$(shell grep -lE '^test:' $(patsubst sapi[%],sapi/%/Makefile,$(TARGETS))))