Skip to content

Instantly share code, notes, and snippets.

Nils Deele

Block or report user

Report or block Deele

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Deele
Deele / sse.html
Last active Mar 2, 2018
Server-Sent Events example, Javascript client-side, PHP server-side
View sse.html
<html>
<body>
<div id="result"></div>
<script>
if (typeof(EventSource) !== 'undefined') {
console.info('Starting connection...');
var source = new EventSource('/stream.php');
source.addEventListener('open', function(e) {
console.info('Connection was opened.');
}, false);
@Deele
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 <nils@dfworks.lv>
* @license GNU GPL v2.0
*
* @param variable
* @returns {boolean}
*/
function isUndefined(variable) {
You can’t perform that action at this time.