View CompanyDetailNew.js
import React, { useEffect, useState } from 'react'; | |
import { CompanyNew } from '../../../Interfaces/Interfaces'; | |
import Main from '../Main'; | |
import MainLayout from '../MainLayout'; | |
interface CompanyDetailNewProps { | |
fetchCompanyNew: (apiFindCompanyNew: any, companyName: string) => Promise<CompanyNew>, | |
apiFindCompanyNew: (companyName: string) => Promise<CompanyNew>, | |
companyName: string | |
} |
View MigrateDB.yml
name: SQL-Migrations | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
migrate: | |
name: Migrate Database |
View FeaturedCompanies.js
import React, { useEffect, useState } from 'react'; | |
import { Company } from '../../Interfaces/Interfaces.company'; | |
interface FeaturedCompaniesProps { | |
findFeaturedCompanies: () => Promise<Array<Company>> | |
} | |
const FeaturedCompanies = (props: FeaturedCompaniesProps) => { | |
const [featuredCompanies, setData] = useState([]); | |
useEffect(() => { |
View FeaturedCompanies.js
import React, { useEffect, useState } from 'react'; | |
import { Company } from '../../Interfaces/Interfaces.Company'; | |
// this doesn't work with brackes for some reason: | |
// const FeaturedCompanies = ({findFeaturedCompanies: () => Promise<Array<Company>>}) => { | |
const FeaturedCompanies = (findFeaturedCompanies: () => Promise<Array<Company>>) => { | |
const [featuredCompanies, setData] = useState([]); | |
useEffect(() => { |
View App.js
import React, { Component } from 'react'; | |
import { Route, Switch } from 'react-router-dom'; | |
... | |
import { useRoutes } from 'hookrouter'; | |
export const routes = { | |
'/login': () => <Login /> | |
}; | |
const RenderRoutes = () => { |
View examples.auth.github.container.registry.yml
# stdout a github secret (environment variable) to stdin with docker login command | |
- run: echo ${{ secrets.GHCP_ACCESS_TOKEN }} | docker login ghcr.io -u USERNAME --password-stdin |
View react-router-functional-component.ts
//source: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/17355 | |
import { RouteComponentProps } from 'react-router-dom'; | |
type MyProps = RouteComponentProps<{ id?: string }> | |
const CoolThing: React.FC<MyProps> = ({ match }) => { | |
const id = match.params.id; | |
return ( |
View user-onboarding-welcome-message.spec.js
it('only sends one welcome message', async () => { | |
mockPost('/chat.postMessage', { called: true }); | |
const channel = ''; | |
const user: SlackUser = { | |
token: '', | |
trigger_id: '', | |
view: undefined, | |
id: '', | |
team_id: '' | |
}; |
View gist:b6a319d730e4651f73d42079317ad33c
#define _CRT_SECURE_NO_WARNINGS | |
#include <stdio.h> | |
#define NUMBER_OF_DAYS 3 | |
// Put your code below: | |
int main(void) | |
{ | |
int k, highEntry, lowEntry; | |
printf("-- -= == IPC Temperature Analyzer == = --\n"); | |
for (int i = 1; i < NUMBER_OF_DAYS; i++) |
View MakeCallTest.java
/* | |
Dave Schinkel's Notes after he wrote this test: | |
This is a test I wrote headlessly with Roboelectric around an existing Legacy codebase that's a mess. | |
We want to get some sort of confidence with an integration test which is what this test gave us for a | |
certain part of this codebase. | |
This test indirectly tests behavior further down by | |
checking what I ultimately expected to be rendered | |
NewerOlder