# ssh -L [my_machine_port]:[remote_machine_port] [remote_user]@[remote_ip]
ssh -L 5000:localhost:3200 [email protected] # Here I forward the remote 3200 port on my localhost:5000
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
<body> | |
<div class="content"> | |
content | |
</div> | |
<footer class="footer"></footer> | |
</body> |
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 { ContextType, Result } from "./types"; | |
import React, { Context, createContext } from "react"; | |
export const Context = | |
createContext<ContextType<Result> | null>(null); | |
return ( | |
<Context.Provider | |
value={{ | |
result: {} as Result |
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
// https://www.typescriptlang.org/play?#code/C4TwDgpgBAglC8UDeBYAUFTUwCcD2YAjAFxQDOwOAlgHYDm6W2+YATKRdfY1rgQMwdKtBmgC+6dKEhQAQgigB5ALZVgAHhgAaKAHI+bXQD5JaadADCClWs079LfsdPmoADXUAVKBAAewCBoAEzJYKAAfOQioCyMFbz8A4NC4AH4w0gT-QJCo9PlSCwBuUwBjPBoKKCoyC1IPWIUkKB5MAxIoACIQPE6tVuYCdi6AdwgyAAs+9Ak0dHLK4GqyWXr1WTjEZoH20m7e-oxeRz2yAEMAGwBXYGnxMoqqmpg1mE3kFqO2lg79u6YDMNOmNJv9jgJTpcbncxEA | |
type A = { | |
prop1: string | |
prop2: string | |
prop3: string | |
} | |
type B = Omit<A, 'prop2'> |
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
name: Publish package on github | |
on: | |
workflow_dispatch: | |
jobs: | |
publish: | |
name: Publish on github packages | |
runs-on: ubuntu-latest | |
permissions: |
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
name: Node.js CI/CD | |
on: [push] # tells github to run this on any push to the repository | |
jobs: | |
test: # names the job | |
runs-on: ubuntu-latest # sets the version of linux we want to use, should be what you have on your server | |
strategy: | |
fail-fast: false # tells github to not run further steps if this one fails |
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 fetch = require('node-fetch') | |
const QUERY = (name) => ` | |
query { | |
game(name: "${name}") { | |
id | |
name | |
streams(first: 50) { | |
edges { | |
node { |
Source : dwyl/hapi-auth-jwt2#48 (comment)
node -e "console.log(require('crypto').randomBytes(256).toString('base64'));" # option 1
openssl rand 256 | base64 # option 2