Skip to content

Instantly share code, notes, and snippets.

componentDidMount() {
this.loadFromStorage()
.then(() => {
if (this.state.api_key) {
this.fetchData();
}})
.done();
}
getDataOptions = () => {
return {
headers: {
'User-Agent': 'app',
'Authorization': `key=${this.state.api_key}`,
},
timeout: 5000
};
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#002b36',
},
});
render() {
async loadFromStorage() {
try {
const value = await AsyncStorage.getItem(STORAGE_KEY);
if (value !== null) {
this.setState({
api_key: value
});
}
} catch (error) {
console.log(`AsyncStorage error: ${error.mesage}`);
@johnthepink
johnthepink / thoughts.md
Created May 5, 2016 02:47
React Native Shell

React Views in React Native

Here is the dream:

import { 
  View,
  Component,
} from "react-native";
// plugin that supports regular react components
@johnthepink
johnthepink / launch.sh
Created July 19, 2016 03:35
launch sample
launch build myapp.com
launch galaxy myapp.com
launch testflight
@johnthepink
johnthepink / ideas.md
Last active July 24, 2016 19:29
App Startup Time

Post-mortem 8/8/2016 - 8/9/2016

Summary

my.newspring.cc was experiencing an issue loading the Give portion of the site which started about 9:30 PM on August 8 until it was resolved around 9:30 AM on August 9. During this time, you may have just seen loading indicators on the site. Several breakdowns happened which led to the error itself, and our not being notified of the error until the morning of August 9. We have identified these issues, and are currently taking steps to prevent them from happening in the future.

Technical Details

We currently manage accounts which can be given to in Rock. These accounts are queried by my.newspring.cc through our GraphQL server, which we call Heighliner. Heighliner fetches the accounts by making a direct connection to the MSSQL database. Specifically, it queries for accounts which have a PublicDescription by eliminating the ones whose PublicDescription is set to NULL. However, this was insufficient because accounts have a default PublicDescription o

Image Sizes

Take from iPhone 6 Plus

EE Bucket

  • Home Feed
    • 414 x 414
    • 828 x 828 (@2x)
  • Sections
@johnthepink
johnthepink / keybase.md
Created August 17, 2016 23:33
keybase.md

Keybase proof

I hereby claim:

  • I am johnthepink on github.
  • I am johnthepink (https://keybase.io/johnthepink) on keybase.
  • I have a public key whose fingerprint is 9512 DD70 9C91 1124 7157 09D7 001C 1BD4 C0EF 6BEF

To claim this, I am signing this object: