Skip to content

Instantly share code, notes, and snippets.

View itelo's full-sized avatar
🎯
Focusing

itelo itelo

🎯
Focusing
View GitHub Profile
export const interpolatePath = (
path: string,
variables: Record<string, string>
) => {
const reg = "[[a-zA-Z]+]";
const exp = new RegExp(reg, "g");
const parameters = path.match(exp);
const pathSpitted = path.split("/");
#include <Arduino.h>
#ifdef ESP32
#include <WiFi.h>
#define RELAY_PIN_1 12
#define RELAY_PIN_2 14
#else
#include <ESP8266WiFi.h>
#define RELAY_PIN_1 D1
#define RELAY_PIN_2 D2
#endif
#include <SoftwareSerial.h>
// Pin definitions
const int rfid_irq = 0;
const int rfid_tx_pin = 6;
const int rfid_rx_pin = 7;
// For communication with RFID module
SoftwareSerial rfid(rfid_tx_pin, rfid_rx_pin);

Keybase proof

I hereby claim:

  • I am itelofilho on github.
  • I am itelofilho (https://keybase.io/itelofilho) on keybase.
  • I have a public key ASAMF2QCpWWS06F8TtFXDBZdnQQJESU9zx4fVcpVtCZ1gQo

To claim this, I am signing this object:

export * from './Button';
export {default as Button} from './Button';
/**
* @format
*/
import {AppRegistry} from 'react-native';
import App from './storybook';
import {name as appName} from './app.json';
AppRegistry.registerComponent(appName, () => App);
{
"extends": "./tsconfig.json",
"compilerOptions": {
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
"sourceMap": true, /* Generates corresponding '.map' file. */
"outDir": "./build", /* Redirect output structure to the directory. */
"noEmit": false, /* Do not emit outputs. */
"skipLibCheck": true
import React from 'react';
import {render} from 'react-native-testing-library';
import Button from './Button';
describe('<Button />', () => {
it('testing color default', () => {
const view = render(<Button>Hello Testing Library</Button>);
expect(view.toJSON()?.props.style.backgroundColor).toBe('blue');
});
import {AppRegistry} from 'react-native';
import {getStorybookUI, configure} from '@storybook/react-native';
import {loadStories} from './storyLoader';
import './rn-addons';
// import stories
configure(() => {
loadStories();
}, module);