Skip to content

Instantly share code, notes, and snippets.

View konsumer's full-sized avatar

David Konsumer konsumer

View GitHub Profile
<!DOCTYPE html>
<html ng-app="minApp">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular-route.min.js"></script>
<script src="angular-layout.min.js"></script>
<link rel="stylesheet" href="angular-layout.css"/>
<style>
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
@konsumer
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`.
{
"directory": "app/bower_components"
}
@konsumer
konsumer / Gruntfile.js
Created March 22, 2014 10:05
Good basic gh-pages with grunt
'use strict';
module.exports = function(grunt) {
var pkg = grunt.file.readJSON('package.json');
grunt.initConfig({
'pkg': pkg,
'cfg': {
@konsumer
konsumer / Post.js
Last active August 29, 2015 13:58
Basic REST + mongoose + express3 setup.
/**
* 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
konsumer / Gruntfile.js
Created April 9, 2014 20:37
Gruntfile uses LESS, bower & heroku, for yeoman angular
// 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
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"
<!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]-->
<head>
<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(',')
// BOOTSTRAP
@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";
angular.module('services')
.service("MusicId", function(){
return [{
"id": "business",
"label": "Business",
"subcats": [{
"label": "Type",
"id": "type",
"value": "hotel",
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end("hi");
}).listen(5000);