Skip to content

Instantly share code, notes, and snippets.

Nils Deele

View GitHub Profile
Deele / sse.html
Last active Mar 2, 2018
Server-Sent Events example, Javascript client-side, PHP server-side
View sse.html
<div id="result"></div>
if (typeof(EventSource) !== 'undefined') {'Starting connection...');
var source = new EventSource('/stream.php');
source.addEventListener('open', function(e) {'Connection was opened.');
}, false);
Deele / baseHtml.js
Created Jan 7, 2015
Port of Yii2 BaseHtml class that provides a set of static methods for generating commonly used HTML tags
View baseHtml.js
* Returns whether given variable is undefined
* @author Nils Lindentals <>
* @license GNU GPL v2.0
* @param variable
* @returns {boolean}
function isUndefined(variable) {
You can’t perform that action at this time.