This file contains hidden or 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
| function buildEntity(entityName: string, properties: [{ name: string, type: string, columnType: string, index?: boolean }]) { | |
| class DMLEntity { | |
| [key: string]: any | |
| constructor() { | |
| for (const property of properties) { | |
| this[property.name] = undefined | |
| } | |
| } | |
| } |
This file contains hidden or 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
| type Ref<T> = T | |
| type Factory<TModel> = () => Ref<TModel> | |
| type PropertyType = 'string' | 'number' | 'boolean' | 'manyToOne' | 'oneToMany' | |
| type PropertyMetadata<Type = PropertyType> = { | |
| type: Type | |
| default?: any | |
| optional?: boolean |
This file contains hidden or 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
| const numberToCharMap = new Map([ | |
| ["+", 0], | |
| ["", 1], | |
| ["a", 2], | |
| ["b", 2], | |
| ["c", 2], | |
| ["d", 3], | |
| ["e", 3], | |
| ["f", 3], | |
| ["g", 4], |
This file contains hidden or 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 bash | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| YELLOW='\033[0;33m' | |
| BLUE='\033[0;34m' | |
| NC='\033[0m' | |
| usage=" | |
| A quick script to add env variables to your heroku application. Following options are required: |