Skip to content

Instantly share code, notes, and snippets.

@GelmanDan
GelmanDan / karma.config.js
Created September 13, 2017 14:26
webpack&jasmine&karma install
module.exports = function(config) {
config.set({
//root path location to resolve paths defined in files and exclude
basePath: '',
//files/patterns to exclude from loaded files
exclude: [],
//files/patterns to load in the browser
files: [
{pattern: 'app/*.js', watched:true, served:false, included:false, nocache:false},
{pattern: 'spec/*.js',watched:true,served:true,included:true}
^(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{2}|[0-9])(\.(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{2}|[0-9])){3}$
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<a class="navbar-brand" href="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-right" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
@GelmanDan
GelmanDan / tree.md
Created March 16, 2014 21:48 — forked from hrldcpr/tree.md

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!