Skip to content

Instantly share code, notes, and snippets.

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

Yousef Kama mastermoo

🏠
Working from home
View GitHub Profile
@mastermoo
mastermoo / flicker-bug.js
Created October 31, 2016 18:02
react native flicker bug using touchableopacity
import React from 'react';
import { StyleSheet, Text, View, TouchableOpacity, Dimensions } from 'react-native';
const { width, height } = Dimensions.get('window');
export default class extends React.Component {
render() {
return (
<View style={styles.container}>
<TouchableOpacity
activeOpacity={0.9}
@mastermoo
mastermoo / mobx-counter-example.js
Last active September 25, 2024 06:51
counter example using mobx
// store.js
import {observable} from 'mobx';
class CounterStore {
@observable counter = 0;
increment() { this.counter++; }
decrement() { this.counter--; }
}
// store.js
class CounterStore {
...
setCounterAsync() {
fetch('/path/to/api')
.then((result) => this.counter = result)
.done();
}
}
@mastermoo
mastermoo / pashto-quran-translation.json
Last active July 26, 2020 21:43
Pashto translation of the holy Quran in a JSON file. Translation by Abdulwali Khan, source: tanzil.net/trans
[
[
{
"surah": 1,
"verse": 1,
"translation": "د الله په نامه سره (شروع كوم) چې ډېر زیات مهربان، بې حده رحم كوونكى دى"
},
{
"surah": 1,
"verse": 2,