This file contains 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
REACT_APP_CLIENT_ID=xxxxxxxxxx | |
REACT_APP_REDIRECT_URI=http://localhost:3000/ | |
REACT_APP_GATEKEEPER_URI=https://xxxxxxx-xxxxx.herokuapp.com |
This file contains 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 React, { Component } from 'react'; | |
import { Container } from 'reactstrap'; | |
import GitCards from '../gitCards/gitCards'; | |
import './repoList.css'; | |
/** | |
* Display the github repository data in a Cards based grid view | |
*/ | |
class RepoList extends Component { | |
constructor(props, context) { |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
... | |
<title>React Git Explorer</title> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous"> | |
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script> | |
</head> |
This file contains 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 { gql } from 'apollo-boost'; | |
const GET_CURSOR_ORG_DATA = gql` | |
query($cursor: String, $org: String = "") { | |
organization(login: $org) { | |
repositories( | |
first: 50 | |
after: $cursor | |
orderBy: { field: PUSHED_AT, direction: DESC } | |
) { |
This file contains 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 ApolloClient from 'apollo-boost'; | |
import { ApolloProvider } from 'react-apollo'; | |
render() { | |
// console.log(this.state.org); | |
const client = | |
this.state.token && | |
new ApolloClient({ | |
uri: 'https://api.github.com/graphql', | |
errorPolicy: 'ignore', |
This file contains 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 { Query } from 'react-apollo'; | |
import { CSVLink } from 'react-csv'; | |
import { GET_CURSOR_ORG_DATA, GET_ORG_DATA } from '../../graphql/queries'; | |
<Query query={GET_ORG_DATA} variables={{ org: org }} errorPolicy="ignore"> | |
{({ loading, error, data, fetchMore }) => { | |
if (error) return `Error! ${error.message}`; | |
// Total available org repositories | |
const totalCount = data.organization |
This file contains 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 dataMachine = new Machine({ | |
id: "posts", | |
initial: "ready", | |
context: { | |
data: [], | |
}, | |
states: { | |
ready: { | |
on: { | |
FETCH_POSTS: "fetching" |
This file contains 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
// Dynamically mount | |
// loadComponent('myvueapp','./FullApp','myid') | |
function loadComponent(scope, module,divId ) { | |
window[scope].get(module).then((m) => { | |
m().default(`#${scope}-app-${divId}`); | |
}); | |
} |
This file contains 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
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
GHBU_BACKUP_DIR="./gitbackup" # where to place the backup files | |
GHBU_ORG="ERS-HCL" # the GitHub organization whose repos will be backed up | |
GHBU_UNAME="<CHANGE ME>" # the username of a GitHub account (to use with the GitHub API) | |
GHBU_PASSWD="<CHANGE ME>" # the password for that account | |
GHBU_GITHOST="https://github.com/" # the GitHub hostname (see notes) | |
GHBU_PRUNE_OLD=true # when `true`, old backups will be deleted | |
GHBU_PRUNE_AFTER_N_DAYS=3 # the min age (in days) of backup files to delete |
This file contains 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 { LoaderFunction, useLoaderData } from "remix"; | |
import useResizeObserver from "use-resize-observer"; | |
import MyResponsiveAreaBump from "~/components/charts/AreaBump"; | |
import MyResponsiveBarCanvas from "~/components/charts/BarCanvas"; | |
import MyResponsiveChordCanvas from "~/components/charts/ChordCanvas"; | |
import MyResponsiveNetworkCanvas from "~/components/charts/NetworkCanvas"; | |
export const loader: LoaderFunction = async ({ params }) => { | |
let result = await Promise.all([ | |
fetch("http://localhost:3100/bar"), |
OlderNewer