Skip to content

Instantly share code, notes, and snippets.

View sbruchmann's full-sized avatar

Steffen Bruchmann sbruchmann

View GitHub Profile
@sbruchmann
sbruchmann / filters.js
Created January 12, 2014 22:57
Chaining Angular.js filters
angular.module('phonecatFilters', [])
.filter('checkmark', function() {
return function(input) {
return input ? '\u2713' : '\u2718';
};
})
.filter('foobar', function() {
return function(input) {
return 'foobar';
};
@sbruchmann
sbruchmann / flat-ui-color-palette.styl
Last active December 24, 2015 05:59
All colors from Flat UI as stylus variables
// See http://flatuicolors.com/
$alizarin = #e74c3c
$amethyst = #9b59b6
$asbestos = #7f8c8d
$belize-hole = #2980b9
$carrot = #e67e22
$clouds = #ecf0f1
$concrete = #95a5a6
$emerald = #2ecc71
$green-sea = #16a085
@sbruchmann
sbruchmann / server.js
Created September 9, 2013 09:46
Process GET request via Node.js
"use strict";
// Module Dependencies & Initializations
var createServer = require("http").createServer;
var qs = require("querystring");
var server = createServer();
server.on("request", function onRequest(req, res) {
var params = qs.parse(req.url);
@sbruchmann
sbruchmann / README.md
Last active December 15, 2015 23:29
node-webkit and Angular.js

Running a standalone app with node-webkit and Angular.js

After you have downloaded and installed node-webkit, create a directory on your hard-drive named myapp.

Place all files of this gist inside the created directory:

  • myapp/
    • app.js
  • index.html