Skip to content

Instantly share code, notes, and snippets.

View EloB's full-sized avatar
🚀
The World Is Mine

Olle Bröms EloB

🚀
The World Is Mine
View GitHub Profile
@EloB
EloB / gist:5958839
Created July 9, 2013 16:26
Look at lines 11 to 14.
<!DOCTYPE HTML>
<html>
<head>
<title>Testem + QUnit</title>
<script type='text/javascript' src='steal/steal.js'></script>
<script type='text/javascript'>
// Load funcunit and qunit first, then the testem.js,
// then our qunit tests.
var testFiles = [];
@EloB
EloB / test.html
Created July 9, 2013 16:29
Look at lines 11 to 14.
<!DOCTYPE HTML>
<html>
<head>
<title>Testem + QUnit</title>
<script type='text/javascript' src='steal/steal.js'></script>
<script type='text/javascript'>
// Load funcunit and qunit first, then the testem.js,
// then our qunit tests.
var testFiles = [];
testFiles.push('src\foo.js');
@EloB
EloB / test.html
Created July 9, 2013 16:30
Look at lines 11 to 14.
<!DOCTYPE HTML>
<html>
<head>
<title>Testem + QUnit</title>
<script type='text/javascript' src='steal/steal.js'></script>
<script type='text/javascript'>
// Load funcunit and qunit first, then the testem.js,
// then our qunit tests.
var testFiles = [];
testFiles.push('src\foo.js');
@EloB
EloB / file1.js
Last active December 23, 2015 00:09
When Iam debugging/developing huge javascript code base and with multiple javascript files that I haven't written myself. Then I often run into trouble with finding the actual code Iam looking for. "Event Listener Breakpoints" is a really neat feature in blink to find where the "magic" happends but 99.9% of the cases I land in a general framewor…
$(function() {
// Tons of code.
$('.btn').click(function() {
// Do something.
});
// Tons of code
});
@EloB
EloB / testem.json
Created October 18, 2013 20:28
This is a Windows bug
{
"test_page": "testem.mustache",
"framework": "mocha",
"src_files": [
"lib/**/*.js",
"test/**/*.js"
],
"serve_files": [
"test/**/*.js"
]
PidFile = /var/hhvm/hhvm.pid
Server {
Port = 80
SourceRoot = /var/www/
DefaultDocument = index.php
}
Log {
Level = Warning
@EloB
EloB / Gruntfile.js
Created February 22, 2014 15:08
I have found out what triggers the error. It's when I have a package.json file that contains the private property.
/* jshint node: true */
module.export = function() {
};
@EloB
EloB / extends.jade
Last active August 29, 2015 14:12
Jade bug?
block content
@EloB
EloB / file1.js
Created January 16, 2015 15:25
Node require recursion example
exports.hello = 'world1';
exports.file2 = require('./file2');
exports.file3 = require('./file3');
@EloB
EloB / regexp.html
Created June 7, 2015 14:54
Why is this regexp slow?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Slow regexp</title>
</head>
<body>
<script>
function convertHtmlToText(html) {
el.innerHTML = html;