Skip to content

Instantly share code, notes, and snippets.

View ue's full-sized avatar
🔫
the css mafia

Ugur ue

🔫
the css mafia
View GitHub Profile
@ue
ue / gist:cc7790b101e5b9c24236e472168f76bb
Last active October 6, 2020 16:44
React Native image does not show with IOS 14 solution
https://github.com/facebook/react-native/issues/29279#issuecomment-658244428
<ProfileContainer>
{({
props1,
props2
}) => (
<Fragment>
<SomekindView
props1={props1}
props2={props2}
/>
// Container
const { children } = this.props;
const { state1, state2 } = this.state;
return (
children &&
children({
props1: state1,
props2: state2
})
// Container
const { state1, state2 } = this.state;
return (
<Screen
props1={state1}
props2={state2}
/>
)
<Container>
<Screen
prop1={prop1}
prop2={prop2}
/>
<Container/>
import React from 'react';
import PropTypes from 'prop-types';
const COLORS = [
'#000',
'#1dad60',
'#1aadf2',
'#ad1d1d',
'#caea69',
'#ea69dd',
import { isEqual } from 'lodash';
import { getOrderByHash } from '../../api/providers/iris';
import {
SET_ORDER,
SET_ORDER_FAIL,
HANDLE_CHANGE,
SELECTED_SKU_CHANGE,
SELECTED_SKU_NOT_ORDERABLE,
@ue
ue / percentBar.txt
Last active October 2, 2018 22:12
react-native percent, progress bar
import React from "react";
import { View, Dimensions } from "react-native";
import styles from "./percentBarStyles";\
const PercentBar = ({ percent, margin, children }) => (
<View>
{children}
<View style={styles.container}>
<View
style={[styles.powerBar, { width: calculateWidth(percent, margin) }]}
@ue
ue / gist:8b24a770f5d8a04aec513e1c7c9b4091
Created August 7, 2018 21:46
bash profile npm sync directory
You can run this command to change the npm prefix, which is where npm will put global modules
npm config set prefix=$HOME/node
Then, edit your .profile or .bashrc file to add this command:
export PATH=$HOME/node/bin:$PATH
Now, every time you log in or open a terminal, it'll run that command to update the PATH environment variable.
If you don't want to re-load that file, you can run export PATH=$HOME/node/bin:$PATH right in your terminal,
and it'll do the same thing.
@ue
ue / gist:d40270140ee777096e9ce23739eb96f8
Created August 2, 2018 19:37
react-native yarn clear cache script
"clear": "watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache"