Skip to content

Instantly share code, notes, and snippets.

View TimonVS's full-sized avatar

Timon van Spronsen TimonVS

View GitHub Profile
const R = require('ramda')
const fetch = require('node-fetch')
const fetchJson = (f) => f.then(res => res.json())
const prepareGithubRequest = R.curry((accessToken, path) => fetchJson(fetch(`https://api.github.com/${path}?access_token=${accessToken}`)))
const fetchFromGithub = prepareGithubRequest(ACCESS_TOKEN)
const getReposFromOrg = org => fetchFromGithub(`orgs/${org}/repos`)
const getPopularRepos = R.compose(R.reverse, R.sortBy(R.prop('stargazers_count')), R.project(['name', 'stargazers_count', 'language']))
@TimonVS
TimonVS / Loader.md
Last active February 15, 2017 12:23

Loader

Shows a loading indicator.

API

Property Description Type Default
type Can be set to ellipsis or spinner string spinner

Button

API

Property Description Type Default
type Can be set to default, ghost, link string default
theme Can be set to primary, secondary, error string primary
size Size of the button. Can be set to xs, sm, md, mdw, lg, xl string md
href When provided the component will render as an <a> instead of `` string ''
@TimonVS
TimonVS / index.html
Last active June 11, 2017 13:43
Electron workshop - step 1
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
</head>
<body>
<div id="app"></div>
</body>
@TimonVS
TimonVS / index.html
Last active June 11, 2017 13:44
Electron workshop - step 2
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Cryptocoin Tracker</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="app"></div>
</body>
@TimonVS
TimonVS / main.js
Created June 11, 2017 15:50
Electron workshop - step 3
const electron = require('electron')
// Module to control application life.
const app = electron.app
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow
const Menu = electron.Menu
const Tray = electron.Tray
const ipc = electron.ipcMain
const path = require('path')
import { fetchCapabilities } from "../actions"
mapDispatchToProps(dispatch) {
return {
fetchCapabilities: () => {
dispatch(fetchCapabilities())
}
}
}
schema:
- ${CONTENTFUL_BASE_URL}${CONTENTFUL_SPACE_ID}:
headers:
Authorization: Bearer ${CONTENTFUL_DELIVERY_ACCESS_TOKEN}
- schema.graphql # <--
documents: "./src/**/*.graphql"
generates:
./src/generated/graphql.ts:
plugins:
- typescript
https://wormhole.app/QW7RL#ncwHIJ2G0F3BZQm3DK8HMA
https://wormhole.app/kzZQ7#69VIM_fur0UFE9O0YjuZjw
https://wormhole.app/o4Qe9#btVAXg1nc7roXTsHmYv6tQ
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.