| Name | Henge Docks - Horizontal Docking Station | Henge Docks - Tethered Dock | TS3 Lite CalDigit | TS3 CalDigit | Thunderbolt 3 Express Dock HD | Plugable TB3 | Elgato TB 3 Dock | OWC Thunderbolt 3 Dock | |----------------|--
View [...nextauth].js
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 NextAuth from "next-auth"; | |
import Providers from "next-auth/providers"; | |
const options = { | |
providers: [ | |
Providers.Credentials({ | |
// The name to display on the sign in form (e.g. 'Sign in with...') | |
name: 'Credentials', | |
// The credentials is used to generate a suitable form on the sign in page. | |
// You can specify whatever fields you are expecting to be submitted. |
View redux_types.js
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 type { GlobalState } from 'redux/modules'; | |
export type ExtractReturn<Fn> = $Call<<T>((...Iterable<any>) => T) => T, Fn>; | |
// ... | |
export type BaseAction = $ReadOnly<{ type: string, error?: boolean }>; | |
// ... |
View ConvertStyles.re
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
open Belt; | |
let teststring = {| | |
"container": | |
style([ | |
flex(1.0), | |
backgroundColor(Colors.darkBackground), | |
justifyContent(SpaceBetween), | |
alignItems(Center), | |
overflow(Hidden), |
View like-posts.php
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
add_action( 'graphql_register_types', function() { | |
register_graphql_field( 'Post', 'likeCount', [ | |
'type' => 'Int', | |
'description' => __( 'The number of likes for the post', 'your-textdomain' ), | |
'resolve' => function( $post ) { | |
$likes = get_post_meta( $post->ID, 'likes', true ); | |
return isset( $likes ) ? (int) $likes : 0; | |
} | |
] ); |
View gist:1e08ba6e9136b7d74a2cc57b5ce1bf10
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
type error('err) = | |
| NetworkError | |
| ExpectedJson | |
| ParseError('err); | |
/** | |
* Map one kind of Belt.Result.Error into another kind of Belt.Result.Error | |
* e.g. (('err => 'otherError), Belt.Result.t('a, 'err)) => Belt.Result.t('a, 'otherError) | |
*/ | |
let mapErr = (fn, r) => switch r { |
View MainApplication.java
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
package com.teslamotors.TeslaApp; | |
import android.app.Application; | |
import com.BaiduMaps.BaiduPackage; | |
import com.airbnb.android.react.maps.MapsPackage; | |
import com.facebook.react.ReactApplication; | |
import com.facebook.react.ReactNativeHost; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.react.shell.MainReactPackage; | |
import com.i18n.reactnativei18n.ReactNativeI18n; |
View README.md
React Native Trouble
Updating to macOS Sierra is causing trouble with React Native due to some of the Node.js and system utilities it uses. Specifically the watch utility fails due to a limit on the number of files which can be opened at a time.
The following command shows the current limit.
launchctl limit maxfiles
View fetch-from-contentful.js
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
#!/usr/bin/env babel-node | |
require('dotenv').config() | |
import contentful from 'contentful' | |
import fs from 'fs-extra-promise' | |
// Contentful Config | |
const apiToken = process.env.CONTENTFUL_DELIVERY_API_TOKEN | |
const spaceId = process.env.CONTENTFUL_SPACE_ID | |
const client = contentful.createClient({ accessToken: apiToken, space: spaceId }) |
NewerOlder