Skip to content

Instantly share code, notes, and snippets.

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

Rafael Cerrejon rcerrejon

🏠
Working from home
View GitHub Profile
@rcerrejon
rcerrejon / svn
Created June 28, 2017 10:45
SVN copy from Trunk to a new Branch
svn copy http://URLTO/trunk http://URLTO/branches/BRANCHNAME -m "first commit"
@rcerrejon
rcerrejon / style.js
Created January 30, 2019 13:23
Vertical and horizontal Component in React Native
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center'
},
@rcerrejon
rcerrejon / terminal.sh
Created February 25, 2019 16:06
thirdparty xcode 10 Problem
cd node_modules/react-native/scripts && ./ios-install-third-party.sh && cd ../../../ && cd node_modules/react-native/third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh && cd ../../../../
@rcerrejon
rcerrejon / RCTLinkingManager.h
Created April 16, 2019 13:53
RN - Nullable Build Error Fix
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <UIKit/UIKit.h>
#import <React/RCTEventEmitter.h>
@rcerrejon
rcerrejon / requestHelper.ts
Last active June 3, 2019 12:31
React Hook API Fetch Helper with axios and Typescript
import { useState, useEffect, useReducer } from 'react'
import axios from 'axios'
/* eslint-disable react-hooks/rules-of-hooks */
type Action =
| { type: 'FETCH_INIT'; payload: [] }
| { type: 'FETCH_SUCCESS'; payload: [] }
| { type: 'FETCH_FAILURE'; payload: [] }
@rcerrejon
rcerrejon / swipe.js
Created November 13, 2019 08:17
swipe React Function
import React, { Component } from 'react'
import { View, Animated, PanResponder } from 'react-native'
// onSwipePerformed = action => {
// switch (action) {
// case 'left': {
// // this.switchTo(1)
// console.log('left Swipe performed')
// break
// }
@rcerrejon
rcerrejon / consolelog.code-snippets
Created January 30, 2020 15:08
console log snippet for javascript and typescript
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
"Print to console with string": {
@rcerrejon
rcerrejon / style.js
Created February 7, 2020 15:48
Flexbox Vertical Align Center
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center'
},
@rcerrejon
rcerrejon / consolelog.code-snippets
Last active November 5, 2020 09:05
console log snippet for javascript and typescript (alt ver.)
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
"Print to console with string": {
"scope": "javascript,typescript,typescriptreact",
@rcerrejon
rcerrejon / gist:07801a67c6ffa86f9a1da8f87d184fb5
Created January 7, 2021 10:02
Custom React Native google search for chrome://settings/searchEngines
http://www.google.com/search?q=react native %s