Skip to content

Instantly share code, notes, and snippets.

View VesperDev's full-sized avatar
🎯
Focusing

Edgar Mendoza VesperDev

🎯
Focusing
View GitHub Profile
@VesperDev
VesperDev / gist:f40ce1c720fd8e43f39d2cf65885f241
Created April 17, 2024 00:11 — forked from t2wu/gist:ce286e0883fe10cd54b664be17bf63fe
Create secret for K8S to access AWS ECR
kubectl create secret docker-registry regcred \
--docker-server=<aws-account-id>.dkr.ecr.<aws-region>.amazonaws.com \
--docker-username=AWS \
--docker-password=$(aws ecr get-login-password) \
-o yaml
# This creates the regcred secret and at the same time output YAML to standard output which you
# can store elsewhere. In my case I have two machines, one having aws and the other having kubectl.
# So I run "aws ecr get-login-password" on one machine and paste the result to replace
# $(aws ecr get-login-password).
In case anybody else stumbles here, my solution was different.
What fixed it for me was manually updating our node_modules/react-native/local-cli/runIOS/findMatchingSimulator.js from
if (!version.startsWith('iOS') && !version.startsWith('tvOS'))
to
if (!version.startsWith('com.apple.CoreSimulator.SimRuntime.iOS') && !version.startsWith('com.apple.CoreSimulator.SimRuntime.tvOS'))
If you console.log(version), each is now prefixed with com.apple.CoreSimulator.SimRuntime.
import { NavigationActions, StackActions } from 'react-navigation';
const resetAction = StackActions.reset({
index: 0,
actions: [NavigationActions.navigate({ routeName: 'MainActivity' })],
});
this.props.navigation.dispatch(resetAction);
import { StyleSheet } from 'react-native'
export const hairlineWidth = StyleSheet.hairlineWidth
export default {
overlay: {
position: 'absolute',
top: 0,
right: 0,
bottom: 0,
left: 0,
opacity: 0.4,
@VesperDev
VesperDev / Activar TabView
Created September 11, 2018 19:58
Activar TabView del plugin react-native-scrollable-tab-view
measureTab(page, event) {
const { x, width, height, } = event.nativeEvent.layout;
this._tabsMeasurements[page] = {left: x, right: x + width, width, height, };
this.updateView({value: this.props.scrollValue._value, });
this.updateView({value: this.props.scrollValue.__getValue(), });
},
render() {
@@ -207,12 +207,12 @@ const ScrollableTabBar = createReactClass({
width = WINDOW_WIDTH;
}
@VesperDev
VesperDev / RouterApp.js
Last active July 14, 2024 11:50
Sider menu + ant-design + react-router-dom
import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import { Layout, Menu, Icon } from 'antd';
import Dashboard from './containers/Dashboard/Dashboard';
import Meseros from './containers/Meseros/Meseros';
const { Header, Content, Footer, Sider } = Layout;
const SubMenu = Menu.SubMenu;