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
# Min and Max threads per worker | |
threads 1, 50 | |
workers 3 | |
app_dir = File.expand_path("../..", __FILE__) | |
app_name = 'app_name' | |
app_dir = "/var/www/#{app_name}" | |
shared_dir = "/var/www/#{app_name}/shared" | |
# Default to production |
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
upstream app { | |
# Path to Puma SOCK file, as defined previously | |
server unix:/home/deploy/appname/shared/sockets/puma.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
root /home/deploy/appname/public; |
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, { useState, useEffect } from 'react' | |
import PropTypes from 'prop-types' | |
import styled from 'styled-components' | |
const StyledWrapper = styled.div` | |
` | |
const $TM_FILENAME_BASE$ = ({ $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
def respond(body: nil, status: 200, serializer: nil, each_serializer: nil) | |
if serializer.present? | |
render json: body, status: status, serializer: serializer | |
elsif each_serializer.present? | |
render json: body, status: status, each_serializer: each_serializer | |
else | |
render json: HashConverter.to_camel_case(body.as_json), status: status | |
render json: HashConverter.to_camel_case(body.as_json.merge!(meta)), status: status | |
end | |
end |
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
echo "\n================================\n" | |
echo "Starting build \n" | |
yarn build | |
echo "Build finished \n" | |
echo "\n================================\n" | |
echo "\n================================\n" | |
echo "Startin upload \n" | |
aws s3 cp ./build/ s3://todoardo --recursive --acl public-read | |
echo "Upload finished \n" | |
echo "\n================================\n" |
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 i18next from "i18next"; | |
import locales from "./locales"; | |
class Locales { | |
static init() { | |
i18next.init( | |
{ | |
lng: "en", | |
debug: false, | |
resources: locales, |
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 { constants } from "utils"; | |
export const emailValidator = (text) => ({ | |
isValid: constants.regex.email.test(text), | |
}); | |
export const passwordValidator = (text) => ({ | |
isValid: constants.regex.password.test(text), | |
}); |
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
*, *::before, &::after { | |
margin: 0; | |
padding: 0; | |
font-family: $font-body; | |
color: $color-text-primary; | |
box-sizing: border-box; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} |
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 fetchMock = (url, suffix = "") => ( | |
new Promise((resolve) => ( | |
setTimeout(() => { | |
resolve({ | |
json: () => ( | |
Promise.resolve({ | |
data: url + suffix, | |
}), | |
) | |
}) |
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
function callAll(...fns) { | |
return (...args) => { | |
fns.forEach(fn => { | |
fn && fn(...args) | |
}) | |
} | |
} |
OlderNewer