Skip to content

Instantly share code, notes, and snippets.

Avatar
🙊

Richard Lindhout RichardLindhout

🙊
View GitHub Profile
@anveo
anveo / remove_node_modules.sh
Created Dec 4, 2013
remove node_modules from git history
View remove_node_modules.sh
git filter-branch --tree-filter 'rm -rf node_modules' HEAD
echo node_modules/ >> .gitignore
git add .gitignore
git commit -m 'Removing node_modules from git history'
@dispix
dispix / CHANGELOG.md
Last active Feb 15, 2021
OAUTH2 Authentication and token management with redux-saga
View CHANGELOG.md

Revision 5

  • Fix error parsing

Revision 4

  • Add missing yield in the login function

Revision 3

@PurpleBooth
PurpleBooth / Dockerfile
Last active Aug 3, 2021
Create a static binary in go and put it in a from scratch docker container
View Dockerfile
FROM golang:1.9
WORKDIR /go/src/github.com/purplebooth/example
COPY . .
RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go
FROM scratch
COPY --from=0 /go/src/github.com/purplebooth/example/main /main
CMD ["/main"]
View TaskDetail.js
import { useNavigationParam } from 'react-navigation-hooks';
import { graphql, usePreloadedQuery } from 'react-relay/hooks';
const query = graphql`
query TaskDetailQuery($nodeId: ID!) {
task: node(id: $nodeId) {
... on Task {
title
}
}
@sibelius
sibelius / AutocompleteRelay.tsx
Last active Oct 22, 2021
@material-ui Autocomplete lab with react-window + infinite-loader for GraphQL/Relay connections
View AutocompleteRelay.tsx
import React, { useRef, useState } from 'react';
import { Typography } from '@material-ui/core';
import TextField from '@material-ui/core/TextField';
import CircularProgress from '@material-ui/core/CircularProgress';
import Autocomplete, {
AutocompleteChangeDetails,
AutocompleteChangeReason,
AutocompleteProps
} from '@material-ui/lab/Autocomplete';