Navigation Menu

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 / gist:9e399c47036d26ec8d5333b1bb53e60c
Last active November 12, 2023 22:59 — forked from paulallies/gist:0052fab554b14bbfa3ef
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
@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
rm -rf node_modules/ && npm cache clean && npm install
@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 / uploadReactNativePhotoToServer.js
Created October 3, 2016 15:18
Upload React-Native photo to server
const photo = {
uri: image,
type: 'image/jpeg',
name: 'avatar.jpg',
};
/* globals FormData */
const data = new FormData();
data.append('avatar', photo);
@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 25, 2016 21:36
Axios add Authorization headers for default
axios.defaults.headers.common['Authorization'] = store.getState().auth.user.token;