Skip to content

Instantly share code, notes, and snippets.

View AilsonFreire's full-sized avatar

Ailson Rocha Freire AilsonFreire

  • Florianópolis/SC - Brasil
View GitHub Profile
@AilsonFreire
AilsonFreire / SmartLockModule.java
Created August 2, 2020 17:21
Initial SmartLockModule creation
package com.smartlock;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
public class SmartLockModule extends ReactContextBaseJavaModule {
private static ReactApplicationContext reactContext;
public static final String REACT_CLASS = "SmartLock";
SmartLockModule (ReactApplicationContext context) {
@AilsonFreire
AilsonFreire / Login.tsx
Created July 29, 2020 09:44
Tela de login
import AsyncStorage from '@react-native-community/async-storage';
import React, { useState } from 'react';
import { Alert, Button, SafeAreaView, StatusBar, StyleSheet, Text, TextInput } from 'react-native';
import { NavigationStackProp } from 'react-navigation-stack';
type Props = {
navigation: NavigationStackProp
}
const Login: React.FC<Props> = ({ navigation }) => {
@AilsonFreire
AilsonFreire / typedoc.txt
Last active December 21, 2019 13:49
Typedoc commands
typedoc --excludeExternals --externalPattern "**/node_modules/**" --ignoreCompilerErrors --name<name of project> --mode "file" --out "<path to file>" "<path of file>"
@AilsonFreire
AilsonFreire / log_fireabse.txt
Created December 17, 2019 15:11
Commands to log a React Native project to Firebase debug
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC
@AilsonFreire
AilsonFreire / tslint.json
Last active November 4, 2019 12:33
React Native tslint.json with all configurations applied in my projects
{
"extends": [
"tslint:recommended",
"tslint-config-standard",
"tslint-react",
"tslint-config-prettier"
],
"rules": {
"class-name": true,
"member-access": false,
@AilsonFreire
AilsonFreire / gist:a64f9361229ac0db1c8721f56a6b0fc4
Created March 19, 2019 18:34 — forked from twoblokeswithapostie/gist:9359477
Code using Momentjs for finding, today, this weekend, this months and next month to and from dates
// JavaScript code that finds dates for today, this weekend, this month, next month
// This weekend = next Sat and Sun
// This month = today to end of this month
// Next month = 1st of next month = end of next month
// Useful on Business Catalyst web app search form for searching from-to dates
// Requires jquery and moment.js
$(document).ready(function(){
$('#today_nav').on("click", function(){