node ace make:command db:create
node ace make:command db:drop
## paste code of `DbCreate.ts` and `DbDrop.ts`
node ace generate:manifest ## After creating/change on commands, run this.
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
| //PATH: app/Exceptions/Handler.ts | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Http Exception Handler | |
| |-------------------------------------------------------------------------- | |
| | | |
| | AdonisJs will forward all exceptions occurred during an HTTP request to | |
| | the following class. You can learn more about exception handling by | |
| | reading docs. | |
| | |
- Create Instance at aws lighsail
- Choose App+OS
- Choose Nginx
- Choose Machine type (e.g. $3.5)
- Set the machine name at Identify your instance
- Create Instance
https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions
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
| //node avrc.js > account.avrc.json | |
| const avrc = { | |
| type: 'record', | |
| namespace: 'server', | |
| name: 'account', | |
| fields: [ | |
| { | |
| name: 'updated_at', | |
| type: 'string', |
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
| [ | |
| { | |
| "AllowedHeaders": [ | |
| "*" | |
| ], | |
| "AllowedMethods": [ | |
| "PUT", | |
| "POST" | |
| ], | |
| "AllowedOrigins": [ |
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
| # build/Dockerfile | |
| FROM ruby:2.7.1-buster | |
| RUN mkdir -p /usr/src/app | |
| WORKDIR /usr/src/app | |
| RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | |
| RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
| RUN apt-get update && apt-get install -y nodejs yarn default-mysql-client nano --no-install-recommends && rm -rf /var/lib/apt/lists/* |
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
| <script> | |
| function copyToClipboard(textToCopy) { | |
| const elem = document.createElement('textarea'); | |
| elem.value = textToCopy; | |
| document.body.appendChild(elem); | |
| elem.select(); | |
| document.execCommand('copy'); | |
| document.body.removeChild(elem); | |
| } |
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
| Engima https://github.com/dayitv89/enigma like vault from hashicorp. uses for transfer/manage environment variables securely on network. | |
| node.js version also available on the enigma repo. |
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
| { | |
| "customizeUI.stylesheet": { | |
| ".tabs-and-actions-container .editor-actions": "display: none !important; position: fixed; right: 0; z-index: 1; background-color: white; top: 50px;", | |
| ".tabs-and-actions-container:hover .editor-actions": "display: flex !important;", | |
| ".title.tabs.show-file-icons .editor-actions": "overflow: unset !important;" | |
| } | |
| } |
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
| # nil? can be used on any Ruby object. It returns true only if the object is nil. | |
| nil.nil? # => true | |
| [].nil? # => false | |
| {}.nil? # => false | |
| "".nil? # => false | |
| " ".nil? # => false | |
| true.nil? # => false | |
| # empty? can be used on some Ruby objects including Arrays, Hashes and Strings. It returns true only if the object's length is zero. | |
| nil.empty? # NoMethodError: undefined method `empty?' for nil:NilClass |