Skip to content

Instantly share code, notes, and snippets.

View felisio's full-sized avatar
🏠
Working from home

Fabio Elisio felisio

🏠
Working from home
  • Vila Nova de Gaia - Porto - Portugal
View GitHub Profile
@felisio
felisio / HttpStatusCode.ts
Created August 24, 2023 13:59 — forked from scokmen/HttpStatusCode.ts
Typescript Http Status Codes Enum
"use strict";
/**
* Hypertext Transfer Protocol (HTTP) response status codes.
* @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
*/
enum HttpStatusCode {
/**
* The server has received the request headers and the client should proceed to send the request body
@felisio
felisio / App.tsx
Created July 28, 2021 16:46
React Native Fingerprint scanner code example
import React from 'react';
import {
Button,
Dimensions,
SafeAreaView,
ScrollView,
StyleSheet,
Text,
View,
} from 'react-native';
@felisio
felisio / App.tsx
Created July 28, 2021 15:42
React Native Keychain code implementation
import React from 'react';
import {
Button,
Dimensions,
SafeAreaView,
ScrollView,
StyleSheet,
Text,
View,
} from 'react-native';
@felisio
felisio / App.tsx
Created July 28, 2021 11:48
React Native Biometric Example
import React from 'react';
import {
Button,
Dimensions,
SafeAreaView,
ScrollView,
StyleSheet,
Text,
View,
} from 'react-native';
@felisio
felisio / App.tsx
Created July 19, 2021 16:01
Acuant form Spike
import React from 'react';
import {
Dimensions,
SafeAreaView,
ScrollView,
StyleSheet,
View,
} from 'react-native';
import WebView from 'react-native-webview';
@felisio
felisio / gist:6ec2e27a3ffb6f9619e762a6ac57274e
Created July 9, 2020 13:32 — forked from ayamflow/gist:b602ab436ac9f05660d9c15190f4fd7b
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
const chokidar = require('chokidar');
const fs = require('fs');
const templates = {
index: name =>
`import React from 'react';
const ${name} = () => (
<div className="${name.toLowerCase()}">
// TODO: write rest of ${name} component
@felisio
felisio / integration_test_signup.test.js
Created July 1, 2019 10:35
Integratio test Signup Container
import { mount } from 'enzyme';
import toJson from 'enzyme-to-json';
import wait from 'waait';
import { MockedProvider } from 'react-apollo/test-utils'
import { ApolloConsumer } from 'react-apollo'
import Signup, { SIGNUP_MUTATION } from '../components/Signup';
import { CURRENT_USER_QUERY } from '../components/User';
import { fakeUser } from '../lib/testUtils';
@felisio
felisio / helpers-data.js
Created November 19, 2018 15:12
Collection of functions for data helper
import {
deburr,
isEmpty,
findIndex,
drop,
pad,
padEnd,
padStart
} from 'lodash';
import moment from 'moment';
@felisio
felisio / calendar-events.js
Created October 10, 2018 11:45
Helpers Collection
export function dateTimeFormatter (date ,format) {
// date: format:'yyyy-MM-dd hh:mm:ss'
if (!date || date == "") {
return ""
}
if (typeof date === "string") {
var mts = date.match(/(\/Date\((\d+)\)\/)/)
if (mts && mts.length >= 3) {
date = parseInt(mts[2])