One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| # YMMV | |
| from django.conf import settings | |
| from django.contrib.auth.models import Group, Permission | |
| from django.core.management.sql import emit_post_migrate_signal | |
| from django.db import migrations, models | |
| import django.db.models.deletion | |
| import logging | |
| import serialize from 'serialize-javascript'; | |
| import path from 'path'; | |
| import fs from 'fs'; | |
| import React from 'react'; | |
| import ReactDOMServer from 'react-dom/server'; | |
| export default <P>( | |
| App: React.ReactElement<P>, | |
| globalState: string | undefined, | |
| ): Promise<string> => new Promise((resolve, reject) => { |
| #!/usr/bin/env bash | |
| # | |
| # find-text: Find text or regex in a given path with context display, | |
| # and omitting temp folders. | |
| # | |
| if [ "$1" == "-h" -o "$1" == "--help" ] | |
| then | |
| cat >&2 <<-'EOF' | |
| find-text: find text or regex in a given path with context display, |
| %YAML 1.2 | |
| --- | |
| # See http://www.sublimetext.com/docs/3/syntax.html | |
| # See http://www.sublimetext.com/docs/3/scope_naming.html | |
| # | |
| # Note that blackslashes don't need to be escaped within single quoted strings | |
| # in YAML. When using single quoted strings, only single quotes need to be | |
| # escaped: this is done by using two single quotes next to each other. | |
| # | |
| # Scope discovery - Ctrl Shft Alt p |
| #!/usr/bin/env bash | |
| # | |
| # applogs.sh | |
| # | |
| # Show logs from AWS Cloud Watch Logs from a given group/stream | |
| # in a human readable way. | |
| # | |
| # Requires awscli and jq 1.5+, and if you are using Mac OS also | |
| # needs coreutils installed. | |
| # |
| 'use strict'; | |
| module.exports = function CustomError(message, extra) { | |
| Error.captureStackTrace(this, this.constructor); | |
| this.name = this.constructor.name; | |
| this.message = message; | |
| this.extra = extra; | |
| }; | |
| require('util').inherits(module.exports, Error); |
| def distinct(iterable, keyfunc=None): | |
| seen = set() | |
| for item in iterable: | |
| key = item if keyfunc is None else keyfunc(item) | |
| if key not in seen: | |
| seen.add(key) | |
| yield item | |
| if __name__ == '__main__': | |
| x = [0, 0, 1, 0, 1, 2, 2, 1, 0] |
| from pyftpdlib.authorizers import DummyAuthorizer | |
| from pyftpdlib.handlers import FTPHandler | |
| from pyftpdlib.servers import FTPServer | |
| authorizer = DummyAuthorizer() | |
| authorizer.add_user("byvoid", "pass", "/home/byvoid/ftp", perm="elradfmw") | |
| handler = FTPHandler | |
| handler.authorizer = authorizer |