Skip to content

Instantly share code, notes, and snippets.

View ts-ign0re's full-sized avatar
🎯
Focusing

ts-ign0re

🎯
Focusing
View GitHub Profile
@ts-ign0re
ts-ign0re / graphql-fetch-schema
Created May 18, 2022 08:15
Add schema fileNamePrefix for multiple grapnel schema support
diff --git a/node_modules/graphql-fetch-schema/lib/index.js b/node_modules/graphql-fetch-schema/lib/index.js
index 0411d13..bf385e4 100644
--- a/node_modules/graphql-fetch-schema/lib/index.js
+++ b/node_modules/graphql-fetch-schema/lib/index.js
@@ -59,14 +59,14 @@ function () {
if (options.graphql) {
files.push({
- filePath: _path.default.resolve(pathPrefix, 'schema.graphql'),
+ filePath: _path.default.resolve(pathPrefix, options.fileNamePrefix ? options.fileNamePrefix + '.schema.graphql' : 'schema.graphql'),
@ts-ign0re
ts-ign0re / appcenter-pre-build.sh
Last active September 28, 2021 04:46
Write env variables from Appcenter with secrets into .env file
# Get all variables and write to .env
ENV_WHITELIST=${ENV_WHITELIST:-"^"}
printf "Creating an .env file with the following whitelist:\n"
printf "%s\n\n" $ENV_WHITELIST
set | egrep -e $ENV_WHITELIST | egrep -v "^_" | egrep -v "WHITELIST" > .env
printf "\n.env created with contents:\n"
cat .env
# copy firebase config files
@ts-ign0re
ts-ign0re / gist:770ef70a697cdee65b5f78b4b3fab440
Last active November 26, 2020 14:23
Firebase: export from firestore A to firestore B
#!/bin/sh
FOLDER_NAME=`date +\%y\%m\%d\%s`
echo "Enter bucket identifier (you can find it in project Settings)"
read BUCKET_NAME
echo "Enter target bucket"
read TARGET_BUCKET
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPBlteRYVBw7sECNd7oGpoX88LqP7PVFRjonHojQrDv8de2nbTRQAgYD1pVwYBZM7KKnllLjUQVt/STIbYhVyS0QBMu1DFE3X5H4GLXLkfuN77zDlMjMn1aNbxoGWsLFjSos+EmfqZo4FikrvI1ZfoeXHjJ4QKZX8f1baGTSiAjeYlQQom/xz5FHWvLv+nmmD1IT9qIRR8lef4FDTsS8AsKtVo3nrD9ApXGocNiOjziQzeD61cthyhKzUhQT7xgeLPoNRi5zo3KOasqFxtA1adfRQXJMBypgBPAwhaIyP5ZYYUngWm6mfSomi53ADXoeMuWRPsqFY19wzIMnQ4q4PX [email protected]
{
"parser": "babel-eslint",
"extends": "airbnb",
"env": {
"browser": true,
"node": true,
"jest": true,
"es6": true
},
"globals": {
[ignore]
; We fork some components by platform
.*/*[.]android.js
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*
yup.addMethod(yup.string, 'domain', function pattern(name, message = VALIDATION_ERRORS.domain) {
const domainRules = [patterns.domain, patterns.punycode, patterns.cyrillicDomain];
return this.test({
message,
test: value => (value === null || value === '' || value === undefined) || domainRules.some(regex => regex.test(value)),
});
});
@ts-ign0re
ts-ign0re / example.elm
Last active March 2, 2018 13:22
trying Elm
import Html exposing (Html, beginnerProgram, fieldset, input, label, text)
import Html.Attributes exposing (style, type_)
import Html.Events exposing (onClick)
main =
beginnerProgram { model = optOut, update = update, view = view }
// Абстрактный контрол для создания радио и чекбоксов выбора цвета
//
control_theme_colored(block)
.{block}_theme_colored
&.{block}
display: inline-block
margin: 0 9.5px 0 0
var btn =
[
{
buttonName: 'Button',
amount: 200,
isActive: false,
},
{
buttonName: 'Button',