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
#!/bin/sh | |
# sample | |
# Sample: appcenter distribute release -f /Users/mingchen/workspace/apps/a4.86/android/app/build/outputs/apk/release/app-release.apk --silent -g Collaborators -a Perkd/Perkd4.86 -b 1985 | |
# Help: appcenter help distribute release | |
# | |
# Usage: appcenter distribute release -f|--file <arg> [--silent] [-R|--release-notes-file <arg>] [-r|--release-notes <arg>] [-s|--store <arg>] [-g|--group <arg>] [-n|--build-number <arg>] | |
# [-b|--build-version <arg>] [-a|--app <arg>] |
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
#!/bin/sh | |
# sample | |
# Sample: appcenter distribute release -f /Users/mingchen/workspace/apps/a4.86/android/app/build/outputs/apk/release/app-release.apk --silent -g Collaborators -a Perkd/Perkd4.86 -b 1985 | |
# Help: appcenter help distribute release | |
# | |
# Usage: appcenter distribute release -f|--file <arg> [--silent] [-R|--release-notes-file <arg>] [-r|--release-notes <arg>] [-s|--store <arg>] [-g|--group <arg>] [-n|--build-number <arg>] | |
# [-b|--build-version <arg>] [-a|--app <arg>] |
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 from 'react'; | |
import {View} from 'react-native'; | |
export default class App extends React.Component { | |
render() { | |
return <View style={{flex: 1, backgroundColor: 'red'}} />; | |
} | |
} |
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
// Map | |
// Payment | |
// import Ajv from 'ajv'; | |
const Ajv = require('ajv'); | |
var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} | |
ajv.addFormat('email', '^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$'); |
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
# for Proxy | |
export ALL_PROXY=socks5://127.0.0.1:10000 | |
#export ALL_PROXY=http://127.0.0.1:9999 | |
#export http_proxy=http://127.0.0.1:9999 | |
#export https_proxy=https://127.0.0.1:50085 | |
export npm_config_proxy=http://127.0.0.1:9999 | |
export npm_config_https_proxy=http://127.0.0.1:9999 | |
# For .nvm |
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
#!/usr/bin/env node | |
const {exec} = require('child_process'); | |
const execute = (cmd) => { | |
console.log('command ==> ', cmd); | |
return new Promise((resolve, reject) => { | |
exec(cmd, (error, stdout, stderr) => { | |
if (error) { | |
console.warn(error); |
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 _ = require('lodash'); | |
// compare object , same key and value, different key sort | |
function case1 () { | |
const a = { k1: 'v1', k2: { k21: 'v21' } }; | |
const b = { k2: { k21: 'v21' }, k1: 'v1' }; | |
console.log(_.isEqual(a, b)); | |
// output |
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
{"lastUpload":"2022-08-03T17:37:34.204Z","extensionVersion":"v3.4.3"} |
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
<div id="IssueCardForm" class="form-vertical hide"> | |
{% form 'customer_login' %} | |
{{ form.errors | default_errors }} | |
<label for="CustomerEmail" class="hidden-label">{{ 'customer.login.email' | t }}</label> | |
<input type="phone" name="customer[phone]" id="CustomerPhone" class="input-full{% if form.errors contains 'email' %} error{% endif %}" placeholder="{{ 'customer.login.phone' | t }}" autocorrect="off" autocapitalize="off" autofocus> | |
<!-- {% if form.password_needed %} | |
<label for="CustomerPassword" class="hidden-label">{{ 'customer.login.password' | t }}</label> |
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 locale = require('locale') | |
supported = new locale.Locales(['en', 'en_US'], 'en'); | |
console.log ((new locale.Locales('en')).best(supported).toString()); // 'en' | |
console.log ((new locale.Locales('en_GB')).best(supported).toString()); // 'en' | |
console.log ((new locale.Locales('en_US')).best(supported).toString()); // 'en_US' | |
console.log ((new locale.Locales('jp')).best(supported).toString()); // en | |