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
rm -rf node_modules/ && npm cache clean && npm install
@EQuimper
EQuimper / hexo.txt
Last active July 11, 2016 15:30
All Hexo command
Server
hexo server
For deploy on github
hexo deploy
When add css etc need to clean before push
hexo clean
Scaffold a post
@EQuimper
EQuimper / ScrollViewSideLikeTinder.swift
Created September 30, 2016 06:08
This is a snippet for make a tinder lookALike swiping with image showing to the side
import UIKit
class ViewController: UIViewController {
var images = [UIImageView]()
override func viewDidLoad() {
super.viewDidLoad()
}
@EQuimper
EQuimper / ShadownOnReactNative.js
Created October 5, 2016 19:23
Shadow on element in react-native
shadowOffset:{
width: 10,
height: 10,
},
shadowColor: 'black',
shadowOpacity: 1.0
// Disable the current file
/* eslint-disable */
// Disable the current line
// eslint-disable-line no-use-before-define
lsof -n -i4TCP:8081
@EQuimper
EQuimper / localStorage.js
Last active November 25, 2016 19:49
LocalStorage persist on redux
export const loadState = () => {
try {
const auth = localStorage.getItem('name');
if (auth === null) return undefined;
return JSON.parse(auth);
} catch (err) {
return undefined;
}
}
@EQuimper
EQuimper / index.js
Created November 29, 2016 06:26
Object literal for replace switch
function getDrink (type) {
var drinks = {
'coke': 'Coke',
'pepsi': 'Pepsi',
'lemonade': 'Lemonade',
'default': 'Default item'
};
return 'The drink I chose was ' + (drinks[type] || drinks['default']);
}
@EQuimper
EQuimper / children.js
Created December 3, 2016 03:03
Children in react
import React from 'react';
const checkSize = size => {
switch (size) {
case 'large':
return 100;
case 'medium':
return 75;
default:
return 50;
@EQuimper
EQuimper / ListView.js
Created December 13, 2016 15:07 — forked from brunolemos/ListView.js
React Native - ListView receiving data as a prop <ListView data={[1,2,3]} />
import React from 'react';
import { ListView } from 'react-native';
export default class extends React.PureComponent {
constructor(props) {
super(props);
const { data, dataSource, rowHasChanged: _rowHasChanged } = props;
this.state.data = data || [];