This file contains hidden or 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 "AppDelegate.h" | |
#import <RNBranch/RNBranch.h> | |
#import <React/RCTBridge.h> | |
#import <React/RCTBundleURLProvider.h> | |
#import <React/RCTRootView.h> | |
#import <React/RCTLinkingManager.h> | |
#import <AppCenterReactNative.h> |
This file contains hidden or 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
/** | |
* 1. Initialize new node project (npm init -y) | |
* 2. Run: npm install ethers | |
* 3. Add private key where PRIVATE_KEY | |
* 4. Optionally, update gas price (line 29) or chosen gas limit | |
* 5. Run: node mint-temporal-loot.js | |
* 6. NOTE: Don't forget to get an API key fgrom Alchemy and replace the variable in line 15 | |
*/ | |
// Imports | |
require("dotenv").config(); |
This file contains hidden or 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 { Client, oauth2 } from 'ketting'; | |
const client = new Client('api.example.org'); | |
client.use(oauth2({ | |
grantType: 'password', | |
clientId: 'fooClient', | |
clientSecret: 'barSecret', | |
tokenEndpointUri: 'https://api.example.org/oauth/token', | |
scopes: ['test'] | |
userName: 'fooOwner', | |
password: 'barPassword' |
This file contains hidden or 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
const ArticleView = () => { | |
const { loading, error, data } = useResource<Article>('/article/1'); | |
if (loading) return <p>Loading…</p>; | |
if (error) return <div class="error">{error.message}</div>; | |
return ( | |
<article> | |
<h1>{data.title}</h1> | |
<p>{data.body}</p> | |
</article> | |
) |
This file contains hidden or 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
const authorCollection = await authorResource.follow('author-collection'); | |
const newAuthor:Author = { | |
firstName: 'Ursula', | |
lastName: 'Le Guin', | |
}; | |
const newAuthorResource = await authorCollection.post(newAuthor); |
This file contains hidden or 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
const ketting = new Ketting('https://api.example.org/'); | |
const createArticle = await ketting.follow('articleCollection').follow('new'); // chained follow | |
const newArticle = await createArticle.post({ title: 'Hello world' }); | |
const author = await newArticle.follow('author'); | |
// Output author information | |
console.log(await author.get()); |
This file contains hidden or 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
{ | |
"_links": { | |
"self": { | |
"href": "/author/4554" | |
}, | |
"curries": [ | |
{ | |
"name": "ns", | |
"href": "http://booklistapi.com/rels/{rel}", | |
"templated": true |
This file contains hidden or 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 "Cleaning up node modules"; | |
rm -rf node_modules; | |
npm install; | |
echo "Clearning all temp directories"; | |
rm -rf $TMPDIR/react-native-packager-cache-*; | |
rm -rf $TMPDIR/metro-*; | |
rm -rf $TMPDIR/react-*; | |
rm -rf $TMPDIR/haste-*; | |
watchman watch-del-all; | |
echo "Cleaning up iOS folders" |
This file contains hidden or 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
componentDidUpdate(prevProps, prevState){ | |
if(prevState.foo !== this.state.foo){ | |
...do the thing | |
} | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en-us"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CSS Stylesheets with Relative Paths</title> | |
</head> | |
<body> | |
<header> |
NewerOlder