Skip to content

Instantly share code, notes, and snippets.

Alex Seville alex-seville

Block or report user

Report or block alex-seville

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
View gist:a57733ae3e41ec5a2a0d
/*! jCarousel - v0.3.1 - 2014-04-26
* http://sorgalla.com/jcarousel
* Copyright (c) 2014 Jan Sorgalla; Licensed MIT */
(function($) {
'use strict';
$.jCarousel.plugin('jcarouselAutoscroll', {
_options: {
target: '+=1',
interval: 3000,
View gist:5e0cffd6abdc8213f584
/*! jCarousel - v0.3.1 - 2014-04-26
* http://sorgalla.com/jcarousel
* Copyright (c) 2014 Jan Sorgalla; Licensed MIT */
(function($) {
'use strict';
var jCarousel = $.jCarousel = {};
jCarousel.version = '0.3.1';
@alex-seville
alex-seville / gist:5861160
Created Jun 25, 2013
Blanket with browser mocha+requirejs
View gist:5861160
<!DOCTYPE html>
<html>
<head>
<title>BaseViewModel.js specs</title>
<link rel="stylesheet" type="text/css" href="../node_modules/mocha/mocha.css">
</head>
<body>
<div id="mocha"></div>
<script src="../node_modules/mocha/mocha.js"></script>
@alex-seville
alex-seville / gist:5268621
Created Mar 29, 2013
Using blanket without data-cover attribute
View gist:5268621
Option 1.
If you have access to the blanket script tag
<script data-cover-filter="src/" src="blanket.js"></script>
Option 2.
Create a new script block and set the blanket options manually
@alex-seville
alex-seville / blanket-jasmine-brackets-adapter.js
Created Jan 17, 2013
A Blanket.js adapter for use in Brackets.
View blanket-jasmine-brackets-adapter.js
(function () {
if (! jasmine) {
throw new Exception("jasmine library does not exist in global namespace!");
}
function elapsed(startTime, endTime) {
return (endTime - startTime)/1000;
}
View issue_157_sans_blanket_sans_initial_require.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Jasmine Spec Runner</title>
<link rel="stylesheet" type="text/css" href="jasmine/jasmine.css"/>
<script type="text/javascript" src="jasmine/jasmine.js"></script>
<script type="text/javascript" src="jasmine/jasmine-html.js"></script>
<link rel="shortcut icon" type="image/png" href="jasmine/jasmine_favicon.png"/>
<!--<script type="text/javascript" src="Coverage/blanket_jasmine.js" data-cover-flags="ignoreError autoStart" data-cover-only="code/"></script>-->
@alex-seville
alex-seville / all.tests.qunit.js
Last active Dec 10, 2015
issue 156 change require syntax changed syntax of all.tests.qunit
View all.tests.qunit.js
/// <reference path="require.js" />
/// <reference path="qunit.js" />
define(['../tests/base/base.qunit.test',
'../tests/ui/ui.qunit.test'],
function (){}
);
View lazyload.js
/*
* Lazy Load - jQuery plugin for lazy loading images
*
* Copyright (c) 2007-2009 Mika Tuupola
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Project home:
* http://www.appelsiini.net/projects/lazyload
@alex-seville
alex-seville / coverage.html
Created Oct 30, 2012
mocha reporter, converted from jade to underscore
View coverage.html
<html>
<head>
<title>Coverage</title>
<script>
headings = [];
onload = function(){
headings = document.querySelectorAll('h2');
};
@alex-seville
alex-seville / lib-blanket.js
Created Oct 29, 2012
custom loading in node
View lib-blanket.js
var fs = require("fs");
var oldLoader = require.extensions['.js'];
//find current scripts
require.extensions['.js'] = function(module, filename) {
if (filename.indexOf("/src/") > -1){
var content = fs.readFileSync(filename, 'utf8');
// Parse the file content and give to module.exports
var covintro = "/* automatically generated by JSCoverage - do not edit */";
You can’t perform that action at this time.