Skip to content

Instantly share code, notes, and snippets.

View jsebrech's full-sized avatar

Joeri Sebrechts jsebrech

View GitHub Profile
@jsebrech
jsebrech / index.html
Created October 17, 2019 18:08
BZA Hackathon App
<html>
<head>
<meta http-equiv="refresh" content="0; url=http://estivus.serveo.net">
</head>
<body>
Redirecting...
<a href="http://estivus.serveo.net">click here if this takes too long.</a>
</body>
</html>
@jsebrech
jsebrech / trello-old-desc.md
Last active December 14, 2018 08:56
Trello bookmarklet for old card description
  1. Create a bookmark for this URL:

javascript:(function(){var id=location.href.match(/trello\.com\/c\/([a-zA-Z0-9]{8})\//)[1];$.get('/1/cards/'+id+'/actions?filter=updateCard:desc').done(function(res){prompt('ctrl-c to copy',res[0].data.old.desc)})})()

  1. Open a card in trello

  2. Open the bookmark

  3. An alert is shown with the previous description (if any)

@jsebrech
jsebrech / CONTRIBUTING.md
Last active April 13, 2018 13:06
Smart Widget CONTRIBUTING.md template

Contribution Guidelines

First off, thanks for taking the time to contribute! 👍

I just have a question

You can launch a quick question on the #acpaas-ui slack channel.

For something that requires longer discussion it may be better to book an issue.

@jsebrech
jsebrech / README.md
Created April 10, 2018 11:51
Smart Widget README.md template

$NAME Smart Widget $PART ($PART = UI / BFF)

$DESCRIPTION

$SCREENSHOT (UI only)

$LINK_TO_DEMO (optional)

How to use

@jsebrech
jsebrech / anonclass.php
Last active August 29, 2015 14:19
Anonymous classes in PHP 5.4+
<?php
function new_($items = null, $extra = "") {
while (class_exists($name = "Anon".rand(), FALSE)) {};
$class =
'class '.$name." ".$extra.PHP_EOL.
'{'.PHP_EOL.
' private $_fns = array();'.PHP_EOL.
' public function __construct($items) {'.PHP_EOL.
' foreach ($items ?: array() as $name => $value) {'.PHP_EOL.
@jsebrech
jsebrech / accessors.php
Created September 28, 2013 08:45
Demo of something like C# accessors in PHP using meta-programming
<?php
// requires PHP 5.4
trait ClassAccessors {
public function __set($name, $value) {
$methodName = "set".ucfirst($name);
if (method_exists($this, $methodName)) {
$this->$methodName($value);
} else {