Skip to content

Instantly share code, notes, and snippets.

View johanjanssens's full-sized avatar
💭
Crunching code, one line at a time.

Johan Janssens johanjanssens

💭
Crunching code, one line at a time.
View GitHub Profile
@johanjanssens
johanjanssens / openmetrics.php
Last active June 19, 2022 13:50
Openswoole - getMetrics()
<?php
/**
* Extracted from https://github.com/openswoole/swoole-src/blob/f191c0b0a98e9b97f5c81d4877f450c863e6c36d/ext-src/php_swoole_library.h#L6999
*
* Changes:
*
* - Added 'service' label
* - Added additional label support
*
@johanjanssens
johanjanssens / index.js
Created January 17, 2021 01:27
CloudFlare worker - Enrich tweet using mircolink.io
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request)
{
const url = new URL(request.url);
const id = url.pathname;
const tweet = await fetchTweet(id);
We also support shortcodes for all our blocks.
There is one caveat, page blocks can **only** be added on pages, not posts. At this time, this means list block can only be added to pages.
## Shortcode examples
### List block
`[docman-list page_category=123 layout=gallery download_in_blank_page=1]`
### Keybase proof
I hereby claim:
* I am johanjanssens on github.
* I am johanjanssens (https://keybase.io/johanjanssens) on keybase.
* I have a public key whose fingerprint is C869 2DF9 23FC FD3F 7A0E F6C6 D213 C9A4 B39E 22FA
To claim this, I am signing this object:
@johanjanssens
johanjanssens / module.php
Created August 8, 2011 02:02
Nooku Framework - Module Template Filter
<?php
/**
* @version $Id: johanjanssens $
* @category Nooku
* @package Nooku_Components
* @subpackage Default
* @copyright Copyright (C) 2007 - 2011 Johan Janssens. All rights reserved.
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://www.nooku.org
*/