Skip to content

Instantly share code, notes, and snippets.

View stevenselcuk's full-sized avatar
🦷
Un-teething now

Steven J. Selcuk stevenselcuk

🦷
Un-teething now
View GitHub Profile
@stevenselcuk
stevenselcuk / secret_gen.rb
Created August 9, 2022 14:02
Secret Generator for Apple Login
require "jwt"
key_file = "./AuthKey_SDFSD45323.p8"
team_id = "9937MYTBBA"
client_id = "org.stuff.myappp"
key_id = "A1240ASD8"
validity_period = 180 # In days. Max 180 (6 months) according to Apple docs.
private_key = OpenSSL::PKey::EC.new IO.read key_file
import React from 'react';
import {SafeAreaView, ScrollView, ActivityIndicator, View} from 'react-native';
import DynamicImport from "../components/DynamicRender";
import components from "../componentsList";
import axios from 'axios';
import {connect} from 'react-redux';
import {withTheme} from '@saypr/kanvaz-theme';
import {createStructuredSelector} from 'reselect';
import {makeSelectUser} from '../redux/selectors';
import { withTheme } from "@saypr/kanvaz-theme";
import axios from "axios";
import React from "react";
import {
ActivityIndicator,
SafeAreaView,
ScrollView,
View
} from "react-native";
import { connect } from "react-redux";
import React, { useEffect, useState } from "react";
import { AppState, Platform } from "react-native";
import navigator from "@saypr/kanvaz-mobile-navigator";
import BackgroundTimer from "react-native-background-timer";
import AsyncStorage from "@react-native-community/async-storage";
import { hasUserSetPinCode } from "./PIN";
const AppLockScreenIdleTime = ({
currentScreen,
timeout,
import React from 'react';
import {Image} from 'react-native';
import Icon from '@saypr/icon';
import {createAppContainer, createSwitchNavigator} from 'react-navigation';
import { createBottomTabNavigator } from 'react-navigation-tabs';
import { createStackNavigator } from 'react-navigation-stack';
import { createDrawerNavigator } from 'react-navigation-drawer';
import { Appearance } from 'react-native-appearance';
import React from 'react';
import { AppRegistry, Text, View } from "react-native";
const TodayWidget = () => (
<View>
<Text>Hello Today Widget!</Text>
</View>
);
AppRegistry.registerComponent('TodayWidgetExtension', () => TodayWidget);
@stevenselcuk
stevenselcuk / index.js
Created August 5, 2020 15:45
Quick Actions
import React, { useEffect } from "react";
import { DeviceEventEmitter, Alert } from "react-native";
import QuickActions from "react-native-quick-actions";
import navigator from "@saypr/kanvaz-mobile-navigator";
let actionList = [
{
type: "Send", // Required
title: "Send Money", // Optional, if empty, `type` will be used instead
subtitle: "Send money from your account",
@stevenselcuk
stevenselcuk / screenLockWithPin.js
Last active July 6, 2020 06:08
Additional security for React Native APP (PIN Lock)
import React, {useState} from 'react';
import {View, Text, Alert, AppState} from 'react-native';
import AsyncStorage from '@react-native-community/async-storage';
import {connect} from 'react-redux';
import {login, loginSuccess} from '../redux/actions';
import {withTheme} from '@saypr/kanvaz-theme-controller';
import Svg, {Path} from 'react-native-svg';
import PINCode, {
resetPinCodeInternalStates,
deleteUserPinCode,
@stevenselcuk
stevenselcuk / themeProviderWithHook.js
Created June 30, 2020 18:11
Easy theming with dark mode support for React Native (without styled-components)
import { registerThemes, useTheme } from 'react-native-themed-styles';
import { Dimensions, Platform } from 'react-native';
import { useThemeState } from '@saypr/kanvaz-hooks';
import { themeState } from '@saypr/kanvaz-utils';
const dimensions = {
fullHeight: Dimensions.get('window').height,
fullWidth: Dimensions.get('window').width,
};
import { Platform } from 'react-native';
import { Appearance, useColorScheme } from 'react-native-appearance';
import { useCallback, useEffect, useState } from 'react';
export default function useThemeState(set) {
const [themeState, setThemeState] = useState(null);
useEffect(() => {
if (Platform.OS === 'web') {
setThemeState(colorScheme);