Skip to content

Instantly share code, notes, and snippets.

View EmaSuriano's full-sized avatar
🇦🇷

Ema Suriano EmaSuriano

🇦🇷
View GitHub Profile
// App.js
import React from 'react';
import { ThemeProvider } from 'styled-components';
import MyApp from 'src/MyApp';
const theme = {
button: {
color: 'white',
background: 'coral',
@EmaSuriano
EmaSuriano / create-icon.js
Created June 3, 2019 07:42
Generate RN icons based on SVG
const { execSync } = require('child_process');
const fs = require('fs');
const toPascalCase = string =>
string
.match(/[a-z]+/gi)
.map(word => word.charAt(0).toUpperCase() + word.substr(1).toLowerCase())
.join('');
console.log('Ready to generate RN icon font ⏰');
@EmaSuriano
EmaSuriano / index.js
Created June 3, 2019 08:29
Example of generated index file by create-icon.js
import React from 'react';
import Icon from './Icon';
export const Louvre = props => <Icon {...props} name="001-louvre" />;
export const LeaningTowerOfPisa = props => <Icon {...props} name="002-leaning tower of pisa" />;
export const Coliseum = props => <Icon {...props} name="003-coliseum" />;
export const Stonehenge = props => <Icon {...props} name="004-stonehenge" />;
// and the list continue ...
@EmaSuriano
EmaSuriano / Icon.native.js
Created June 3, 2019 09:04
Icon component that uses react-native-vector-icons to load a custom font along with the glyph map
import customFontGlyph from '../../assets/font/custom-font-icon.json';
import { createIconSet } from 'react-native-vector-icons';
export default createIconSet(customFontGlyph, 'custom-font-icon', 'custom-font-icon.ttf');
@EmaSuriano
EmaSuriano / App.js
Created June 3, 2019 09:12
Gallery of generated custom icons in react native
import React from 'react';
import { StyleSheet, ScrollView, Text, View } from 'react-native';
import { Font } from 'expo';
import * as Icons from './src/Icon';
const styles = StyleSheet.create({
container: {
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
{
"projects": [
"EmaSuriano/gatsby-starter-mate",
"EmaSuriano/astro-art-portfolio",
"EmaSuriano/astro-mate",
"EmaSuriano/astro-resume",
"EmaSuriano/github-tracker",
"EmaSuriano/react-hotkey-tooltip",
"EmaSuriano/gatsby-starter-event-calendar",
"EmaSuriano/gatsby-theme-jsonresume",
@EmaSuriano
EmaSuriano / improve-leo-navigation.js
Created May 21, 2020 10:35
Simple script to improve the usage of `https://dict.leo.org/` for the mobile version inside pc.
// cleanup
setTimeout(function() {
document.querySelectorAll("[tabindex]")
.forEach(x => x.removeAttribute('tabindex'));
document.querySelectorAll('button').forEach(x => x.remove());
}, 500)
// watcher
var lastSearch = ""
var currentSearch = "";
@EmaSuriano
EmaSuriano / improve-leo-navigation.js
Last active May 21, 2020 17:53
Simple script to improve the usage of `https://dict.leo.org/` for the mobile version inside pc.
// cleanup
document.addEventListener('DOMContentLoaded', () => {
// remove other tabindex elements
document
.querySelectorAll('[tabindex]')
.forEach((elem) => elem.removeAttribute('tabindex'));
document.querySelectorAll('button').forEach(x => x.remove());
});
// watcher
@EmaSuriano
EmaSuriano / create-react-app.js
Last active May 25, 2020 08:46
Sample of Gist
import React from 'react';
import logo from './logo.svg';
import './App.css';
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
{
"basics": {
"name": "Emanuel Suriano",
"label": "Senior Software Engineer",
"image": "https://media-exp1.licdn.com/dms/image/C4D03AQGwsLuvWm8psQ/profile-displayphoto-shrink_200_200/0?e=1596067200&v=beta&t=JokwPp6EiuherMNVEnPT8kEnQFVi9VJRx4ThOC5U2uA",
"email": "emanuel.suriano@gmail.com",
"phone": "",
"website": "https://emasuriano.com/",
"summary": "A senior engineer with over 5 years of experience in software development. Experienced in Frontend development, mentoring engineers, and software architecture. Open Source enthusiast, speaker, and writer.",
"location": {