Skip to content

Instantly share code, notes, and snippets.

@robinboehm
robinboehm / gist:6150b9572a3abdc5961d
Created June 17, 2015 10:39
How to use Karma in Gulp
var gulp = require('gulp'),
karma = require('karma').server;
gulp.task('watch', function (done) {
karma.start({
configFile: __dirname + '/karma.conf.js',
singleRun: false,
autoWatch: true
}, done);
});
@robinboehm
robinboehm / .jshintrc
Created July 25, 2014 08:29
Example JSHint
{
"node": true,
"browser": true,
"es5": false,
"esnext": true,
"bitwise": true,
"camelcase": false,
"curly": true,
"eqeqeq": true,
"immed": true,
@robinboehm
robinboehm / colorPicker.spec.js
Created March 28, 2014 10:23
ColorPicker-Task Screencast
describe('A ColorPicker', function () {
// Inputs
it('should define four input tags', function () {
expect(document.getElementsByTagName("input").length).toBe(4);
});
describe('input tags', function () {
it('should define a type="range" at each input-element', function () {
@robinboehm
robinboehm / index.html
Created March 27, 2014 20:41
ScreenCast-ColorPicker-Solved
<!DOCTYPE html>
<html ng-app>
<head>
<title></title>
</head>
<body ng-init="r=1;g=1;b=1;a=1">
<h1>ColorPicker</h1>
<input type="range" min="0" max="255" step="1" ng-model="r"/><br/>
@robinboehm
robinboehm / index.html
Created March 17, 2014 09:37
Overlay with widgets
<!DOCTYPE html>
<html ng-app="angularLeapUi">
<head>
<title></title>
<style>
.leap-hover {
background-color: red;
}
</style>
@robinboehm
robinboehm / index_overlay.html
Created March 17, 2014 09:36
LeapMotion angular-leap no-js
<!DOCTYPE html>
<html ng-app="playground">
<head>
<title></title>
</head>
<body leap-bind="{hands : 'hands', pointables : 'pointables', interactionBox: 'interactionBox'}">
<div ng-repeat="pointable in pointables"
style="background-color:red;
border-radius: 50%;
@robinboehm
robinboehm / angular-touch.js
Created March 10, 2014 00:46
temp ngTouch build
/**
* @license AngularJS v1.3.0-beta.2-build.local+sha.2935dad
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
/**
* @ngdoc module
* @name ngTouch
<h2 class="bm-book-title">{{ book.title }}</h2>
<h3 class="bm-book-subtitle">{{ book.subtitle }}</h3>
<p>
<ul>
<li class="bm-book-isbn">ISBN: {{ book.isbn }}</li>
<li class="bm-book-num-pages">Seiten: {{ book.numPages }}</li>
<li class="bm-book-author">Autor: {{ book.author }}</li>
<li>
Verlag:
<a ng-href="{{ book.publisher.url }}"
@robinboehm
robinboehm / book_details.js
Created March 4, 2014 09:49
workshop 03/14 BookDetailCtrl
"use strict";
angular.module('myApp')
.controller('BookDetailsCtrl', function ($scope) {
$scope.book = {
title : 'JavaScript für Enterprise-Entwickler',
subtitle : 'Professionell programmieren im Browser und auf dem Server',
isbn : '978-3-89864-728-1',
abstract : 'JavaScript ist längst nicht mehr nur für klassische Webprogrammierer interessant.',
numPages : 302,
@robinboehm
robinboehm / index.html
Created March 3, 2014 10:21
Workshop makeHTTPRequest 03/14
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Q Beispiel</title>
<script src="bower_components/q/q.js"></script>
</head>
<body>
<header>
<h1>Q Beispiel</h1>