Name | Layer | Type | Description |
---|---|---|---|
app/models/visitor_pass.rb | Domain | Aggregate | Pass-related domain |
app/services/tracker_service.rb | Domain | Domain Service | Logic between door and visitor interaction |
app/controllers/passes_controller.rb | Application | Use Case | The user flow of "pass" a door |
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 { MiddlewareFn } from "type-graphql"; | |
import { redis } from "./redis"; | |
import { MyContext } from "./types/MyContext"; | |
const ONE_DAY = 60 * 60 * 24; | |
export const rateLimit: (limit?: number) => MiddlewareFn<MyContext> = ( | |
limitForAnonUser = 50, | |
limitForUser = 100 | |
) => async ({ context: { req }, info }, next) => { |
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
"""Autogenerated input type of AcceptTopicSuggestion""" | |
input AcceptTopicSuggestionInput { | |
"""The Node ID of the repository.""" | |
repositoryId: ID! | |
"""The name of the suggested topic.""" | |
name: String! | |
"""A unique identifier for the client performing the mutation.""" | |
clientMutationId: String |
- Bash v5+ checkout Upgrading Bash on macOS
- bash-completion@2
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
/** | |
* For compare function return: | |
* - Less than zero: item1 has higher priority than item2. | |
* - Zero: same. | |
* - Greater than zero: item1 has lower priority than item2. | |
*/ | |
export type CompareFunction<T> = (item1: T, item2: T) => number; | |
export class PriorityQueue<T> { | |
_items: Array<T>; |
This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
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
window.Clipboard = (function(window, document, navigator) { | |
var textArea, | |
copy; | |
function isOS() { | |
return navigator.userAgent.match(/ipad|iphone/i); | |
} | |
function createTextArea(text) { | |
textArea = document.createElement('textArea'); |
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
# first install pygmentize to the mac OS X or macOS system with the built-in python | |
sudo easy_install Pygments | |
# then add alias to your ~/.bash_profile or ~/.bashrc or ~/.zshrc etc. | |
alias pcat='pygmentize -f terminal256 -O style=native -g' |
NewerOlder