Skip to content

Instantly share code, notes, and snippets.


David Konsumer konsumer

View GitHub Profile
View index.html
<!DOCTYPE html>
<html ng-app="minApp">
<script src=""></script>
<script src=""></script>
<script src="angular-layout.min.js"></script>
<link rel="stylesheet" href="angular-layout.css"/>
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
konsumer / .bowerrc
Last active August 29, 2015 13:57
a quick example of minification, optimization, LESS, and auto-dependencies with grunt. Put index.html in app/ Put site.less in app/less/ Put your images in app/img/ Do `npm install` to install all the dev tools, then run `grunt` to build. `grunt serve` runs a dev webserver for app/. You can update bower deps with `grunt bower`.
View .bowerrc
"directory": "app/bower_components"
konsumer / Gruntfile.js
Created March 22, 2014 10:05
Good basic gh-pages with grunt
View Gruntfile.js
'use strict';
module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');
'pkg': pkg,
'cfg': {
konsumer / Post.js
Last active August 29, 2015 13:58
Basic REST + mongoose + express3 setup.
View Post.js
* Model that represents a post that has been approved by an admin
* @type {Model}
var mongoose = require('mongoose');
var Post = new mongoose.Schema({
"id": {type: String, required: true, unique: true},
"source": { type: String, enum: ["twitter", "instagram"], required:true },
"tag": {type: String, required: true},
konsumer / Gruntfile.js
Created April 9, 2014 20:37
Gruntfile uses LESS, bower & heroku, for yeoman angular
View Gruntfile.js
// Generated on 2014-04-01 using generator-angular 0.7.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
konsumer / app_assets_index.html
Last active August 29, 2015 13:59
stuff for wade - replace "_" with "/", put bootstrap less files in app/less/bootstrap and type "npm install" to make brunch watch for changes and build webroot: "brunch w", you can build a production copy with "brunch b -P"
View app_assets_index.html
<!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"><![endif]-->
<!--[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if IE 8]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]-->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="" />
from __future__ import with_statement # < python 2.6
# parse CSV, 1 point at a time
with open("data.txt") as f:
for line in f:
point = line.strip().split(',')
View site.less
@import "../bower_components/strapless/less/variables";
@import "../bower_components/strapless/less/mixins";
@import "../bower_components/strapless/less/normalize";
@import "../bower_components/strapless/less/print";
@import "../bower_components/strapless/less/scaffolding";
@import "../bower_components/strapless/less/type";
@import "../bower_components/strapless/less/code";
@import "../bower_components/strapless/less/grid";
@import "../bower_components/strapless/less/tables";
View MusicId.js
.service("MusicId", function(){
return [{
"id": "business",
"label": "Business",
"subcats": [{
"label": "Type",
"id": "type",
"value": "hotel",
View test.js
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});