Skip to content

Instantly share code, notes, and snippets.

View lazd's full-sized avatar

Larry Davis lazd

View GitHub Profile
@lazd
lazd / bug843.html
Created June 29, 2012 14:42
Test case for cloudhead/less.js bug #843
<!DOCTYPE html>
<html>
<head>
<title>less.js bug #843: minimal case to produce error</title>
</head>
<body>
<link rel="stylesheet/less" type="text/css" href="styles_bug843.less">
<script src="http://lesscss.googlecode.com/files/less-1.3.0.min.js" type="text/javascript"></script>
@lazd
lazd / at2x_working.html
Created June 29, 2012 14:53
Working version of designermonkey's at2x mixin from cloudhead/less.js bug #843
<!DOCTYPE html>
<html>
<head>
<title>less.js bug #843: working at2x mixin</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
</head>
<body>
<link rel="stylesheet/less" type="text/css" href="styles.less">
<script src="http://lesscss.googlecode.com/files/less-1.3.0.min.js" type="text/javascript"></script>
@lazd
lazd / grunt.js
Created October 16, 2012 18:12
grunt-mocha test failure
/*global module:false*/
module.exports = function(grunt) {
// External tasks
grunt.loadNpmTasks('grunt-mocha');
grunt.initConfig({
// Configure
mocha: {
cui: {
@lazd
lazd / hammer.js
Created November 5, 2012 01:43
hammer.js pull/89 fixed
/*
* Hammer.JS
* version 0.6.3
* author: Eight Media
* https://github.com/EightMedia/hammer.js
* Licensed under the MIT license.
*/
function Hammer(element, options, undefined)
{
var self = this;
@lazd
lazd / gist:4630739
Created January 25, 2013 01:23
THREE.JS: Rotate an object in 3D space given the position of the axes of a gamepad
var xRot = gamepad.y;
var yRot = gamepad.x;
// Rotate X relative to model axis
object.matrix.rotateX(xRot);
// Rotate Y relative to world axis
var axis = new THREE.Vector3(0,1,0);
var rotWorldMatrix = new THREE.Matrix4();
rotWorldMatrix.makeRotationAxis(axis.normalize(), yRot);
@lazd
lazd / home.md
Last active December 15, 2015 11:59
Frontend Kickstart

Topics

  • JavaScript
    • The language
      • Data structures
        • [Array/stack/queue][Array]
        • [Object/map][Object]
      • Loops
        • [for][for]/[while][while]
  • [for in][for in]
@lazd
lazd / gulpfile.js
Created December 14, 2013 01:11
es.through undefined file
var gulp = require('gulp');
var es = require('event-stream');
function plugalug() {
function queue(file) {
if (typeof file === 'undefined') {
throw new Error('File was undefined!');
}
}
function end() {
@lazd
lazd / gulpfile.js
Created December 14, 2013 01:12
es.map file undefined
var gulp = require('gulp');
var es = require('event-stream');
function plugalug() {
return es.map(function(file) {
if (typeof file === 'undefined') {
throw new Error('File was undefined!');
}
});
}
@lazd
lazd / gulpfile.js
Created December 14, 2013 01:36
es.map file defined
var gulp = require('gulp');
var es = require('event-stream');
function plugalug() {
return es.map(function(file) {
if (typeof file === 'undefined') {
console.trace();
throw new Error('File was undefined!');
}
});
@lazd
lazd / gulpfile.js
Created December 14, 2013 20:18
test case for execify/1
var gulp = require('gulp');
var es = require('event-stream');
var path = require('path');
var filePath = path.join(__dirname, 'gulpfile.js');
var expectedFile;
function plugalug() {
return es.map(function(file, cb) {
if (typeof file === 'undefined') {