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
| export interface Site { | |
| siteId: string; // unique id for each site | |
| clock: number; | |
| sequence: Char[]; | |
| operationPool: Char[]; | |
| } | |
| export interface Char { | |
| id: string; | |
| charId: CharId; |
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
| payload set A | |
| initial ∅ | |
| update add(element e) | |
| A := A ∪ {e} | |
| query lookup(element e) : boolean b | |
| let b = (e ∈ A) | |
| compare (S, T) : boolean b | |
| let b = (S.A ⊆ T.A) | |
| merge (S, T) : payload U | |
| let U.A = S.A ∪ T.A |
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
| payload integer[n] P | |
| initial [0,0,...,0] | |
| update increment() | |
| let g = myId() | |
| P[g] := P[g] + 1 | |
| query value() : integer v | |
| let v = Σi P[i] | |
| compare (X, Y) : boolean b | |
| let b = (∀i ∈ [0, n - 1] : X.P[i] ≤ Y.P[i]) | |
| merge (X, Y) : payload Z |
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
| // WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. | |
| // It will be overwritten. | |
| const awsmobile = { | |
| aws_project_region: 'eu-central-1', | |
| aws_cognito_identity_pool_id: 'eu-central-1:XXXX-XXXX-XXXX-XXXX-XXXX', | |
| aws_cognito_region: 'eu-central-1', | |
| aws_user_pools_id: 'eu-central-1_XXXXXXX', | |
| aws_user_pools_web_client_id: 'XXXXXXXXXXXXXXXXX', | |
| oauth: {}, |
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 PrivateRoute: React.ComponentType<any> = ({ | |
| component: Component, | |
| ...rest | |
| }) => { | |
| return ( | |
| <Route | |
| {...rest} | |
| render={props => | |
| fakeAuth.isAuthenticated ? ( | |
| <Component {...props} /> |
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
| interface Props extends RouteComponentProps {} | |
| interface State { | |
| redirectToReferrer: boolean; | |
| } | |
| class Login extends React.Component<Props, State> { | |
| constructor(props: Props) { | |
| super(props); | |
| this.state = { | |
| redirectToReferrer: false |
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 React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| export default class MouseMovement extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| timer: undefined, | |
| }; | |
| this.timeout = this.timeout.bind(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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>HTML5 Canvas Drawing</title> | |
| </head> | |
| <body> |
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
| Step 1: Open ./bash_profile: | |
| open ~/.bash_profile | |
| Step 2: Add your variable and save file | |
| export MYVARIABLE='valueHere' | |
| Step 3: Restart your terminal and check if you env variable exists |