INSERT GRAPHIC HERE (include hyperlink in image)
Subtitle or Short Description Goes Here
ideally one sentence >
#!/usr/bin/env ruby | |
# Run with | |
# $ chmod +x chat.rb && ./chat.rb | |
# or | |
# $ ruby chat.rb | |
require 'socket' | |
require 'thread' |
module ApplicationHelper | |
def current_class?(test_path) | |
return 'active' if request.path == test_path | |
'' | |
end | |
end |
#add 'node_modules' to .gitignore file | |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin <branch-name> |
import NativeModules from 'NativeModules'; | |
const Intercom = NativeModules.Intercom; | |
export default class IntercomHelper { | |
static registerWithUserId(userId) { | |
Intercom.registerIdentifiedUser(userId); | |
} | |
static reset() { | |
Intercom.reset(); |
import React from "react" | |
import { Route, Switch } from "react-router-dom" | |
const AppRoute = ({ component: Component, layout: Layout, ...rest }) => ( | |
<Route {...rest} render={props => ( | |
<Layout> | |
<Component {...props} /> | |
</Layout> | |
)} /> | |
) |
When Invalid Host Header when ngrok tries to connect to Angular or React dev server use this form for run ngrok. | |
ngrok http 8080 -host-header="localhost:8080" | |
ngrok http --host-header=rewrite 8080 |
import React, { createContext } from "react"; | |
const SocketContext = createContext({ | |
queueLength: 0, | |
positionInLine: 0, | |
}); | |
export default SocketContext; |
gatsby-config.js
first.require('ts-node').register()
which registers a TypeScript evaluator that will be used when Gatsby
reads all other API Javascript files. In other words, we only need to do
this once in our entire codebase and not in other Gatsby files like
gatsby-node.js
.gatsby-config.js
re-exports all the exported variables available
in gatsby-config.ts
.There is a plugin on Strapi Marketplace that do this response transforming stuffs in a more configurable way. Checkout this if you are interested.