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
#!/bin/bash | |
CMD=$(basename $0) | |
SED=$(which sed) | |
GREP=$(which grep) | |
ECHO=$(which echo) | |
CUT=$(which cut) | |
CAT=$(which cat) | |
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 { decorate } from './private/utils'; | |
// WIP: prototypical, might not be working at all, needs additional work! | |
function findSuperDesc(superklass, key) | |
{ | |
let result; | |
let supklass = superklass; | |
while (supklass.prototype) | |
{ | |
if (Object.hasOwnProperty(supklass, key)) |
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 util from 'util'; | |
function hypotheticalDecoratorThatMerges(target, key, descriptor) | |
{ | |
let result = descriptor; | |
if ('get' in descriptor || 'set' in descriptor) | |
{ | |
const desc = {}; | |
Object.keys(descriptor).forEach( |
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
#!/usr/bin/env /usr/bin/node | |
// usage ./cli [grammar.js] unit.ypo | |
// default grammar is ypo.js | |
var fs = require('fs'); | |
var path = require('path'); | |
var util = require('util'); | |
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
# adapted from django.contrib.auth | |
# | |
# simply import the here provided login() to make mongoengine work with Django 1.8.1 | |
from django.conf import settings | |
from django.middleware.csrf import rotate_token | |
from django.utils.translation import LANGUAGE_SESSION_KEY | |
from django.contrib.auth.signals import user_logged_in, user_logged_out, user_login_failed | |
from django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY, HASH_SESSION_KEY, REDIRECT_FIELD_NAME, get_user_model, load_backend | |
from bson import ObjectId |
NewerOlder