Installing Xcode and the command line tools need to be done first because it installs gcc
.
https://developer.apple.com/xcode/features/
Or via the terminal:
Installing Xcode and the command line tools need to be done first because it installs gcc
.
https://developer.apple.com/xcode/features/
Or via the terminal:
server { | |
listen 80; ## listen for ipv4; this line is default and implied | |
listen [::]:80 default ipv6only=on; ## listen for ipv6 | |
root /usr/share/nginx/www; | |
index index.php index.html index.htm; | |
# Make site accessible from http://localhost/ | |
server_name _; |
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
#!/bin/sh | |
docker images --format '{{.Size}}\t{{.Repository}}\t{{.Tag}}\t{{.ID}}' | sed 's/ //' | sort -h -r | column -t |
const axios = require('axios') | |
/* ... */ | |
const params = new URLSearchParams() | |
params.append('name', 'Akexorcist') | |
params.append('age', '28') | |
params.append('position', 'Android Developer') | |
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/') | |
params.append('awesome', true) |
import PropTypes from 'prop-types'; | |
import React, { Component } from 'react'; | |
import { StripeProvider } from 'react-stripe-elements'; | |
export default class AsyncStripeProvider extends Component { | |
static propTypes = { | |
apiKey: PropTypes.string.isRequired | |
}; | |
// constructor |
const http = require('http'); | |
const fetch = require('node-fetch'); | |
const getToken = () => new Promise((resolve, reject) => { | |
const server = http.createServer(async (req, res) => { | |
res.end(); | |
const params = new URLSearchParams(req.url.slice(1)); | |
console.log('rec', req.url, params); | |
if (params.has('code')) { | |
resolve(params.get('code')); |
import React, { useState, useEffect, useRef } from 'react' | |
import { StripeProvider } from 'react-stripe-elements' | |
type TProvider = React.FC<{ apiKey: string }> | |
const AsyncStripeProvider: TProvider = props => { | |
const { apiKey, children } = props | |
const [stripe, setStripe] = useState<stripe.Stripe | null>(null) | |
const isMounted = useRef(false) | |
const unmountFn = () => { |
any
: magic, ill-behaved type that acts like a combination of never
(the proper [bottom type]) and unknown
(the proper [top type])
never
is assignable to any
, and any
is assignable to anything at all.any & AnyTypeExpression = any
, any | AnyTypeExpression = any
unknown
: proper, well-behaved [top type]
unknown
. unknown
is only assignable to itself (unknown
) and any
.unknown & AnyTypeExpression = AnyTypeExpression
, unknown | AnyTypeExpression = unknown
any
whenever possible. Anywhere in well-typed code you're tempted to use any
, you probably want unknown
.