Skip to content

Instantly share code, notes, and snippets.

View fakenickels's full-sized avatar
💭
hello this is a mic test, are you listening

Gabriel Rubens Abreu fakenickels

💭
hello this is a mic test, are you listening
View GitHub Profile
var wat = {
name: "ghostflame",
version: "80.50.49",
private: !0,
scripts: {
"clean-generated": "./scripts/clean-generated.sh",
"compile-relay": "./scripts/compile-relay.sh",
"watch-relay": "./scripts/watch-relay.sh",
devtools: "react-devtools",
lint: "tslint --project ./tsconfig.json --config ./tslint.json",
module type Config = BsReform.ReForm.Config;
open ReactNative;
type meta = | Money | Password | Text | Mask(string);
module Make = (Config: Config) => {
module Form = BsReform.ReForm.Make(Config);
[@react.component]
let make = (~schema, ~initialState, ~onSubmit) => {
open Form.Validation;
# for each and every validator
comby 'Email(:[field]),' '+ email(:[field])' .re -i
comby 'NoValidation(:[field]),' '+ [|NoValidation({field: :[field]})|]' .re -i
comby 'StringNonEmpty(:[field]),' '+ nonEmpty(:[field])' .re -i
comby 'StringRegExp(:[field], :[matches]),' '+ regExp(~matches=:[matches], :[field])' .re -i
comby 'Custom(:[field], :[predicate]),' '+ custom(:[predicate] :[field])' .re -i
comby 'FloatMin(:[field], :[min]),' '+ float(~min=:[min], :[field])' .re -i
comby 'IntMin(:[field], :[min]),' '+ int(~min=:[min], :[field])' .re -i
comby 'StringMin(:[field], :[min]),' '+ string(~min=:[min], :[field])' .re -i
comby 'FloatMax(:[field], :[max]),' '+ float(~max=:[max], :[field])' .re -i
// FormMaker experiment
module type Config = {
type field('a);
type state;
let set: (state, field('a), 'a) => state;
let get: (state, field('a)) => 'a;
};
module Make = (Config: Config) => {
[@bs.module "react-native-camera"] [@react.component]
external make:
(
~onBarCodeRead: {. "data": string} => unit=?,
~captureAudio: bool,
~ref: 'ref=?,
~style: ReactNative.Style.t=?,
~children: React.element=?
) =>
React.element =
// Generated by BUCKLESCRIPT, PLEASE EDIT WITH CARE
'use strict';
var Messaging = require("@react-native-firebase/messaging");
function getToken(param) {
return Messaging.default.getToken();
}
function onTokenRefresh(cb) {
import RNFetchBlob from 'rn-fetch-blob'
import gql from 'graphql-tag'
import client from '../apollo'
const UPLOAD_FILE_QUERY = gql`
query UploadFileQuery($input: GetSignedPutURLInput!) {
getSignedPutUrl(input: $input) {
error
path
url
module Async = {
type state('a) =
| Idle
| Loading
| Data('a)
| Error(AddpayApi.Api.requestError);
type action('a) =
| Fetch(
Promise.rejectable(
Belt_Result.t('a, AddpayApi.Api.requestError),
ifeq ($(OS), Windows_NT)
detected_OS := Windows
else
detected_OS := $(shell sh -c 'uname 2>/dev/null || echo Unknown')
endif
ifeq ($(detected_OS), Windows)
BSB := ./node_modules/bs-platform/win32/bsb.exe
endif
ifeq ($(detected_OS), Linux)
auchenberg.vscode-browser-preview
bungcip.better-toml
Dart-Code.dart-code
Dart-Code.flutter
eamodio.gitlens
esbenp.prettier-vscode
esy.esy-vscode
extr0py.vscode-relative-line-numbers
freebroccolo.reasonml
GabrielNordeborn.vscode-reasonml-graphql