This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://community.home-assistant.io/t/simple-set-thermostat-at-specific-time/255778 | |
blueprint: | |
name: Set thermostat temperature at specific time | |
description: Sets a Thermostat to a specifc temperature at a certain time everyday | |
domain: automation | |
input: | |
time_to_set: | |
name: Time | |
selector: | |
time: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'remove cache' | |
rm -rf $TMPDIR/react-* | |
rm -rf $TMPDIR/metro-* | |
watchman watch-del-all | |
npm cache verify | |
# echo 'removing derived data' | |
rm -rf ~/Library/Developer/Xcode/DerivedData | |
echo 'removing pods and node modules' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Identify | |
const trackingOpts = { id, usernameOrEmail: email }; | |
Analytics.identify(id, TrackingOpts); | |
// Simple event | |
Analytics.track(Analytics.events.BOOTSTRAP); | |
// Event with paramenters | |
Analytics.track(Analytics.events.USER_CREATED_ACCOUNT, trackingOpts); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Constants from 'expo-constants'; | |
import * as Amplitude from 'expo-analytics-amplitude'; | |
import { TrackingOptions, normalizeTrackingOptions } from './AnalyticsUtils'; | |
import { ENV } from '../environment'; | |
let isInitialized = false; | |
const apiKey = ENV.AMPLITUDE; | |
const { installationId, deviceName, deviceId, deviceYearClass, expoVersion, nativeAppVersion, nativeBuildVersion, platform, manifest: { version }} = Constants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class App extends React.PureComponent { | |
render() { | |
return ( | |
<View style={{width: '100%', height: '100%'}}> | |
<OtherComponent /> | |
<SpecialComponent ref={(ref) => ComponentHelper.setReference(ref)}/> | |
</View> | |
) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fastfile | |
# | |
# Author: Ronaldo Lima <[email protected]> | |
# | |
# ----------------------------------------------------------- | |
# | |
# Version bumping, the default type is `patch` | |
# Run: | |
# `fastlane ios bump` | |
# `fastlane ios beta [type:major|minor|patch]` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AsyncStorage } from 'react-native' | |
import react, { useEffect } from "react" | |
import { useState } from 'react' | |
import { useNetInfo } from './useNetInfo'; | |
export const getData = async (key: string) => { | |
try { | |
const value = await AsyncStorage.getItem(key) | |
if (value !== null) { | |
return JSON.parse(value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useReducer, useContext, ReactNode } from 'react' | |
import { Text, View, TouchableOpacity, StyleSheet } from 'react-native' | |
const initialArg = 0 | |
type Action = | |
| { type: 'increment' } | |
| { type: 'decrement' } | |
| { type: 'set'; count: number } |
NewerOlder