Run npm install
then gulp && karma start
to try out the tests.
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
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
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
application: some-dummy-app-name # overridden by -A | |
dispatch: | |
# Let's Encrypt ACME challenge service | |
- url: "*/.well-known/acme-challenge/*" | |
module: acme |
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
""" | |
Human UX strings mapping | |
See http://stackoverflow.com/a/27459196 | |
0 1 2 3 4 5 6 7 8 9 A B C D E F Hexadecimal | |
H M N 3 4 P 6 7 R 9 T W C X Y F Replacement | |
Y = U = V | |
C = G |
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
# << Any invalid Javascript character. | |
module.exports.hereiam = -> | |
console.log("0xDEADBEEF") |
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
""" | |
From blog post: http://brianmhunt.github.io/articles/ndb-tags/ | |
License: MIT <http://brianmhunt.mit-license.org/> | |
""" | |
from google.appengine.ext import ndb | |
MAX_TAGS_FOR_TAGGABLE = 1000 | |
POPULAR_PAGE_SIZE = 30 |
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 Crypto.Random | |
from Crypto.Protocol import KDF | |
from google.appengine.ext import ndb | |
from datetime import datetime | |
class Credentials(ndb.Model): | |
"""Credentials to authenticate a person. | |
""" | |
# --- Class Variables --- | |
# Our pseudo-random stream - used for generating random bits for the |
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 os | |
import sys | |
import logging | |
import unittest | |
from pdb import set_trace | |
from google.appengine.ext import testbed | |
from flask import Flask, session | |
app = Flask('fs') |
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
# | |
# Deep pluck | |
# ~~~~~~~~~~ | |
# Pull a deeply nested element out based on an array of arguments | |
# | |
# e.g. array['abc'][0] == deepPluck(array, ['abc', 0]) | |
# | |
deepPluck = (obj, array_or_string, _default=undefined) -> | |
if _.isString(array_or_string) | |
keys = array_or_string.split('.') |
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
# This is just a stub variable to keep track of multiple bindings. | |
# One could just have the bindings.date below directly link to | |
# ko.bindingHandlers, but then you would have to update the unit tests. | |
bindings = {} | |
# This gist depends on the inclusion of libraries: | |
# | |
# lodash (or underscore): http://lodash.com | |
# Used for _.isEqual, _.isDate, _.isString, _.defer | |
# |
NewerOlder