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 / .jsx
Last active August 29, 2015 14:25
repeat jsx components-1
var Button = React.createClass({
render: function(){
return (
<TouchableHighlight style={styles.button} onPress={this._doSomeThing} underlayColor="#fff" activeOpacity='0.5'>
<View>
<Text>{this.props.buttonName}</Text>
</View>
</TouchableHighlight>
)
}
var btn =
[
{
buttonName: 'Button',
amount: 200,
isActive: false,
},
{
buttonName: 'Button',
// Абстрактный контрол для создания радио и чекбоксов выбора цвета
//
control_theme_colored(block)
.{block}_theme_colored
&.{block}
display: inline-block
margin: 0 9.5px 0 0
@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 }
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)),
});
});
[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/.*
{
"parser": "babel-eslint",
"extends": "airbnb",
"env": {
"browser": true,
"node": true,
"jest": true,
"es6": true
},
"globals": {
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPBlteRYVBw7sECNd7oGpoX88LqP7PVFRjonHojQrDv8de2nbTRQAgYD1pVwYBZM7KKnllLjUQVt/STIbYhVyS0QBMu1DFE3X5H4GLXLkfuN77zDlMjMn1aNbxoGWsLFjSos+EmfqZo4FikrvI1ZfoeXHjJ4QKZX8f1baGTSiAjeYlQQom/xz5FHWvLv+nmmD1IT9qIRR8lef4FDTsS8AsKtVo3nrD9ApXGocNiOjziQzeD61cthyhKzUhQT7xgeLPoNRi5zo3KOasqFxtA1adfRQXJMBypgBPAwhaIyP5ZYYUngWm6mfSomi53ADXoeMuWRPsqFY19wzIMnQ4q4PX [email protected]
@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
@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