Skip to content

Instantly share code, notes, and snippets.

View retyui's full-sized avatar
undefined

Davyd NRB retyui

undefined
View GitHub Profile
@retyui
retyui / number-input.html
Created February 13, 2017 14:14
Uneversal number input for mobile keyboard!
<input type="number" pattern="[0-9]*" data-numeric-input>
@retyui
retyui / server.md
Created August 15, 2018 12:27
proxy React Native bandler to other compouter

I wokr on Linux and how I can test on IPhone?

This server.js I run on MacOS

Then all changes when I do on linux automatically apply on simulator on MacOS

Run

On Linux

@retyui
retyui / Install.md
Last active August 26, 2018 20:13
React Native auto deploy your application to Google Drive
yarn add fs-extra googleapis@33 mime-types shelljs

deploy.js

'use strict';

const { resolve } = require('path');
@retyui
retyui / delete.discord.messages.js
Last active August 23, 2019 09:05
Remove all discord messages
(async () => {
const ONE_OUR = 3.6e6;
const ONE_DAY = ONE_OUR * 24;
const ONE_WEEK = ONE_DAY * 7;
const ONE_MONTH = ONE_DAY * 30;
const MY_ACC = '450630799713370122';
const AUTH_HEADERS = {
authorization:
'NDUwNjMwNzk5NzEzMzcwMTIy.D1nm-A.-Y4FVlVUPvpa5iOhFPcV8wHezn4',
'x-fingerprint': '550955708544319502._NRVO3hY6wEg0MGkbkaV_blfirs',
@retyui
retyui / example.md
Last active October 27, 2020 08:07
HOW USE FLOW.JS WITH REDUX-SAGA

These examples for:

Install or update typings

flow-typed install # for initial run
@retyui
retyui / err.md
Last active August 3, 2019 10:23
FLOW.JS Report, 3 August 2019 (flow 0.95-0.104)
@retyui
retyui / interceptors.js
Created September 16, 2019 07:31
Axios interceptors ordering
const axios = require('axios');
const a= axios.create()
a.interceptors.request.use(
(v) => (console.log('request 1 start'),v),
(v) => (console.log('request 1 end '),v)
)
@retyui
retyui / fbt.sh
Created October 7, 2019 22:52
fbt bash utils
#!/bin/bash
BIN=./node_modules/babel-plugin-fbt/bin
TMP_ROOT=./.i18n-cache
SRC_ROOT=./src
SRC_MANIFEST=${TMP_ROOT}/src-manifest.json
ENUM_MANIFEST=${TMP_ROOT}/enum-manifest.json
SOURCE_STRINGS=${TMP_ROOT}/source-strings.json
@retyui
retyui / bable-fix.md
Last active October 9, 2019 07:45
Fix plugin-transform-typescript for fbt

In file node_modules/@babel/plugin-transform-typescript/lib/index.js

For a function isImportTypeOnly add code:

  function isImportTypeOnly({
    binding,
    programPath,
    jsxPragma
 }) {
@retyui
retyui / globals.d.ts
Created October 9, 2019 07:53
Typescript definition library for fbt (https://facebookincubator.github.io/fbt/)
/// <reference types="react" />
declare namespace FBT {
type $Values<T> = T[keyof T];
// https://github.com/facebookincubator/fbt/blob/e9c591f451dbfc91852e316869ae39ad41848c55/runtime/nonfb/GenderConst.js#L9-L23
interface GenderConst {
NOT_A_PERSON: 0;
FEMALE_SINGULAR: 1;
MALE_SINGULAR: 2;