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 axios from 'axios'; | |
import { faker } from '@faker-js/faker'; | |
async function sendRequest() { | |
const data = { | |
template: 'TEMPLATE', | |
data: { | |
'title.text': faker.lorem.sentence() | |
} | |
}; |
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
export const LOCALE_PATTERN = /[a-z]{2}_[A-Z]{2}/gi; | |
export const isLocaleValid = (locale: string): boolean => { | |
return Boolean(new RegExp(LOCALE_PATTERN).test(locale)); | |
} | |
export const getBrowserLocaleOrNull = (): string | null => { | |
const locale = window.navigator.language; //won't work on SSR |
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
msgid "" | |
msgstr "" | |
"Project-Id-Version: SimpleLocalize 1.0\n" | |
"Report-Msgid-Bugs-To: [email protected] \n" | |
"Last-Translator: Jakub Pomykała <[email protected]>\n" | |
"Language: de\n" | |
"MIME-Version: 1.0\n" | |
"Content-Type: text/plain; charset=UTF-8\n" | |
"Content-Transfer-Encoding: 8bit\n" | |
"Plural-Forms: nplurals=2; plural=(n != 1);\n" |
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
#!/bin/bash | |
# I installed MariaDB 10 from Package Center | |
export PATH=/bin:/usr/bin:/usr/local/bin:/volume1/@appstore/MariaDB10/usr/local/mariadb10/bin | |
# Put backups in the same place where the script is placed | |
DB_BACKUP_PATH=`dirname "$0"` | |
backup-mysql() { | |
MYSQL_HOST=$1 |
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
version: 0.1 | |
phases: | |
install: | |
commands: | |
# Install nodejs https://nodejs.org/en/download/package-manager/ | |
- curl -sL https://deb.nodesource.com/setup_7.x | bash - | |
- apt-get install -y nodejs | |
# Install yarn natively https://yarnpkg.com/en/docs/install#linux-tab | |
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | |
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list |
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
#!/usr/bin/env bash | |
rm -rf ./build/classes/ | |
rm -rf ./build/jar/ | |
rm -rf ./build/dist/ | |
mkdir -p build/classes | |
mkdir -p build/jar | |
# compile |
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
FROM openjdk:11-jre-slim | |
LABEL maintainer="[email protected]" | |
ENV PATH $PATH:$JAVA_HOME/bin | |
ENV JAVA_OPTS "-server -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+OptimizeStringConcat -Dsun.net.inetaddr.ttl=60" | |
ENV HEAP_SPACE "-Xms512m -Xmx2g" | |
ENV REMOTE_DEBUG "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:1044" | |
ENV JMX "-Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=127.0.0.1 -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" | |
ENV TIME_ZONE UTC | |
ENV SPRING_PROFILES_ACTIVE live |
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
<div> | |
<form action="#" id="callbackForm" class="contact-form"> | |
<div class="form-group"> | |
<label for="email">Email</label> | |
<input type="email" required id="email" class="form-control" placeholder="" autocomplete="email" name="email" /> | |
</div> | |
<div class="form-group"> | |
<label for="name">Message</label> | |
<input id="message" type="text" class="form-control" placeholder="" name="message" /> | |
</div> |
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
public class OfferSearchConditionFactory { | |
public static Collection<Condition> create(OfferSearchFilter searchFilter) { | |
List<Condition> conditions = Lists.newArrayList(); | |
Optional<OfferSearchFilter> filter = Optional.of(searchFilter); | |
filter | |
.map(OfferSearchFilter::getUserId) |
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
onChangeShareValue = (newShareValue: number, ingredientRowIndex: number) => { | |
const { | |
values, | |
setValues | |
} = this.props; | |
const nextIngredients = [...values.ingredients]; | |
nextIngredients[ingredientRowIndex].shareAmount = newShareValue; | |
setValues({...values, ingredients: [...nextIngredients]}); | |
}; |
NewerOlder