This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Nancy; | |
namespace MyApi | |
{ | |
public class DocModule : NancyModule | |
{ | |
public DocModule() | |
{ | |
Get ["/doc"] = _ => { | |
return View ["index.html"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Globalization; | |
using System.Windows.Data; | |
namespace WpfApplication1 | |
{ | |
/* | |
see: http://cuppster.com/2014/07/10/using-the-state-pattern-for-adorning-in-xaml/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Numerics; | |
namespace Cuppster | |
{ | |
/// <summary> | |
/// converted from the python version at https://github.com/stochastic-technologies/shortuuid | |
/// </summary> | |
class ShortUUID | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/env/python | |
# coding=utf8 | |
""" | |
Converting Degrees, Minutes, Seconds formatted coordinate strings to decimal. | |
Formula: | |
DEC = (DEG + (MIN * 1/60) + (SEC * 1/60 * 1/60)) | |
Assumes S/W are negative. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the application | |
// | |
var AppView = Backbone.View.extend({ | |
el: $('body'), | |
initialize: function() { | |
var view = this; | |
// command bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
def string_patterns(pattern, *args): | |
'''generator for string patterns''' | |
for data in itertools.product(*args): | |
s = pattern.format(*data) | |
yield s | |
# generate some urls! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Shared Collections for backbone.js | |
*/ | |
// shared collection | |
// useful when the user may enter the site in multiple routes/views, | |
// but use the same collection | |
var SharedCollection = function(collection) { | |
var obj = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ## Header View | |
// | |
var HeaderView = Backbone.View.extend({ | |
// model backing the view | |
model: new (Backbone.Model.extend({ | |
defaults: { | |
hasUpdate: false, | |
} | |
})), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ## global namespace | |
// | |
var Leo = {} | |
// ## Leonardo Options | |
// | |
Leo.options = (function() { | |
return { | |
api : 'http://dev.leonar.do/api', |
OlderNewer