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
| import { | |
| ChronoFlow, | |
| StatefulWorkflow, | |
| StatefulWorkflowParams, | |
| StatefulWorkflowOptions, | |
| ManagedPaths, | |
| Property, | |
| On, | |
| interceptors, | |
| ManagedPath, |
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
| temporal workflow signal \ | |
| --workflow-id MyWorkflowId \ | |
| --name MySignal \ | |
| --input '{"Input": "As-JSON"}' \ | |
| --query 'ExecutionStatus = "Running" AND WorkflowType="YourWorkflow"' \ | |
| --reason "DoSomething" |
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 MILLISECONDS_IN_A_SECOND: number = 1000; | |
| const SECONDS_IN_A_MINUTE: number = 60; | |
| const MINUTES_IN_AN_HOUR: number = 60; | |
| const HOURS_IN_A_DAY: number = 24; | |
| const DAYS_IN_A_WEEK: number = 7; | |
| const MILLISECONDS_IN_A_MINUTE = MILLISECONDS_IN_A_SECOND * SECONDS_IN_A_MINUTE; | |
| const MILLISECONDS_IN_AN_HOUR = MILLISECONDS_IN_A_MINUTE * MINUTES_IN_AN_HOUR; | |
| const MILLISECONDS_IN_A_DAY = MILLISECONDS_IN_AN_HOUR * HOURS_IN_A_DAY; | |
| const MILLISECONDS_IN_A_WEEK = MILLISECONDS_IN_A_DAY * DAYS_IN_A_WEEK; |
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
| #!/bin/bash | |
| set -ex | |
| export HOMEBREW_PREFIX=~/homebrew | |
| # export HOMEBREW_NO_ANALYTICS=1 | |
| mkdir -p "${HOMEBREW_PREFIX}" | |
| curl -fsSLk https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C "${HOMEBREW_PREFIX}" | |
| ls -laR "${HOMEBREW_PREFIX}" |
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
| Model.extend({ /* @Prototype */ | |
| // ... | |
| field: { | |
| validate: { | |
| is: ["^[a-z]+$",'i'], // will only allow letters | |
| is: /^[a-z]+$/i, // same as the previous example using real RegExp | |
| not: ["[a-z]",'i'], // will not allow letters | |
| isEmail: true, // checks for email format (foo@bar.com) | |
| isUrl: true, // checks for url format (http://foo.com) | |
| isIP: true, // checks for IPv4 (129.89.23.1) or IPv6 format |
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
| Model.extend('User', | |
| { | |
| type: 'ORM' | |
| }, | |
| { | |
| hashPassword: function(password) { | |
| this.debug('Hashing users password'); | |
| this.password = crypto.createHash('sha1').update(password).digest('hex'); | |
| } | |
| }); |
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
| Model.extend('User', | |
| { | |
| type : 'ORM' | |
| }, | |
| { | |
| firstName : String, | |
| setFirstName : function(firstName) { | |
| this.entity.dataValues.firstName = 'foo' + firstName; | |
| }, |
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
| include: [ | |
| { | |
| // Required, the model you want to eager load | |
| model: UserModel, | |
| // Required if the assocation is aliased 'as' | |
| as: 'users', | |
| // Optional, smart where for the query | |
| where: {}, |
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
| order: [ | |
| 'name', | |
| // will return `name` | |
| 'username DESC', | |
| // will return `username DESC` -- i.e. don't do it! | |
| ['username', 'DESC'], | |
| // will return `username` DESC | |
| Model.fn('max', Model.col('age')), | |
| // will return max(`age`) | |
| [Model.fn('max', Model.col('age')), 'DESC'], |
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
| findByName | |
| findByNameIn | |
| findByNameLike | |
| findByNameNotLike | |
| findByNameILike | |
| findByNameNotILike | |
| findByNameStartsWith | |
| findByNameEndsWith | |
| findByNameNot | |
| findByNameNotEqual |
NewerOlder