View script.conf
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
# save it on /etc/init | |
start on startup | |
task | |
exec /path/to/command |
View retry.js
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
const retry = (fn, options = {}) => new Promise((resolve, reject) => { | |
const { retryInterval = 500, retries = 1 } = options; | |
fn() | |
.then(resolve) | |
.catch(err => ( | |
(retries === 0) | |
? reject(err) | |
: setTimeout( | |
() => retry(fn, { retryInterval, retries: retries - 1 }).then(resolve, reject), | |
retryInterval, |
View view.controller.tsx
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 { Context, dependency, Get, render, TokenRequired } from '@foal/core'; | |
import * as React from 'react'; | |
import * as ReactDOMServer from 'react-dom/server'; | |
import { User } from '../entities'; | |
import { TypeORMStore } from '@foal/typeorm'; | |
export class ViewController { | |
@dependency | |
store: TypeORMStore; |
View styledExtended.tsx
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
const Background = styled(LinearGradient).attrs(() => ({ | |
colors: ['#464769', '#1B1A1F'], | |
}))` | |
padding-top: 50px; | |
flex: 1; | |
` |
OlderNewer