Skip to content

Instantly share code, notes, and snippets.

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

Emanuel Quimper EQuimper

🏠
Working from home
View GitHub Profile
@EQuimper
EQuimper / pck.json
Created January 8, 2017 14:15
ex jest script
"scripts": {
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage"
},
"jest": {
"setupFiles": ["./test/jestsetup.js"],
"snapshotSerializers": [
"<rootDir>/node_modules/enzyme-to-json/serializer"
]
@EQuimper
EQuimper / user.js
Created January 11, 2017 00:14
upload img aws
import express from 'express';
import uuid from 'uuid';
import AWS from 'aws-sdk';
import dotenv from 'dotenv'
dotenv.config();
import User from '../models/user';
let s3 = new AWS.S3();
@EQuimper
EQuimper / index.js
Created January 16, 2017 12:58
react-native exponent i18n
import i18n from 'react-native-i18n'
import Exponent from 'exponent'
import es from '../locales/es'
import en from '../locales/en'
i18n.fallbacks = true
const getLanguage = async () => {
i18n.locale = (await Exponent.Util.getCurrentLocaleAsync()).substring(0,2)
@EQuimper
EQuimper / index.js
Created January 18, 2017 14:39
Using ref in functional component
function CustomForm ({handleSubmit}) {
let inputElement
return (
<form onSubmit={() => handleSubmit(inputElement.value)}>
<input
type='text'
ref={(input) => inputElement = input} />
<button type='submit'>Submit</button>
</form>
)
@EQuimper
EQuimper / index.txt
Created February 4, 2017 20:18
Find port for close
lsof -i:3000
<Menu widths={3}>
<Menu.Item name="" />
<Menu.Item><img src={logo} /></Menu.Item>
<Menu.Item name="Hello" />
</Menu>
@EQuimper
EQuimper / .editorconfig
Created February 17, 2017 14:46
My Editor Config Setup
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
// Place your settings in this file to overwrite the default settings
{
"editor.fontSize": 15,
"editor.fontFamily": "Consolas",
"editor.tabSize": 2,
"editor.wordWrapColumn": 80,
"editor.fontLigatures": true,
"editor.snippetSuggestions": "top",
"editor.minimap.enabled": true,
"files.exclude": {
@EQuimper
EQuimper / vscode.txt
Last active December 5, 2018 03:12
VS CODE PACKAGES
5 TOP PACKAGES
1. Path Intellisense
2. Project Manager
3. Auto Rename Tag
4. JavaScript (ES6) code snippets
5. Output Colorizer
You need to have
@EQuimper
EQuimper / now.json
Created February 25, 2017 19:56
Now without build
"now-build": "echo 'not building'"