Use the diff
code highlighting tag.
```diff
- foo
+ bar
Example:
import { useState, useEffect } from 'react'; | |
// Usage | |
function App() { | |
// Call our hook for each key that we'd like to monitor | |
const happyPress = useKeyPress('h'); | |
const sadPress = useKeyPress('s'); | |
const robotPress = useKeyPress('r'); | |
const foxPress = useKeyPress('f'); |
// check version | |
node -v || node --version | |
// list locally installed versions of node | |
nvm ls | |
// list remove available versions of node | |
nvm ls-remote | |
// install specific version of node |
if ( | |
process.env.NODE_ENV === 'production' && | |
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ && | |
Object.keys(window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers).length | |
) { | |
window.__REACT_DEVTOOLS_GLOBAL_HOOK__._renderers = {} | |
} |
<style> | |
.bg-video { | |
position: fixed; | |
top: 0; | |
left: 0; | |
width: 100vw; | |
height: 100vh; | |
overflow: hidden; | |
z-index: -1; | |
} |
<?php | |
// reference https://github.com/WP-API/WP-API/blob/develop/lib/infrastructure/class-wp-rest-server.php | |
// serve_request() function | |
add_filter( 'rest_pre_serve_request', 'multiformat_rest_pre_serve_request', 10, 4 ); | |
function multiformat_rest_pre_serve_request( $served, $result, $request, $server ) { | |
// assumes 'format' was passed into the intial API route | |
// example: https://baconipsum.com/wp-json/baconipsum/test-response?format=text |
/* | |
Based on: | |
1. http://stephen.io/mediaqueries | |
2. https://css-tricks.com/snippets/css/media-queries-for-standard-devices/ | |
*/ | |
/* iPhone X in portrait & landscape */ | |
@media only screen | |
and (min-device-width : 375px) | |
and (max-device-width : 812px) |
var fs = require("fs") | |
var ssl_options = { | |
key: fs.readFileSync('privatekey.pem'), | |
cert: fs.readFileSync('certificate.pem') | |
}; | |
var port = process.env.PORT || 3000; | |
var express = require('express'); | |
var ejs = require('ejs'); | |
var passport = require('passport') |