-
brew install gnupg, pinentry-mac
(this includes gpg-agent and pinentry) -
Generate a key:
$ gpg --gen-key
-
Take the defaults. Whatevs
-
Tell gpg-agent to use pinentry-mac:
$ vim ~/.gnupg/gpg-agent.conf
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
// Demo https://guste.design/gallery/ | |
// Install https://www.npmjs.com/package/react-medium-image-zoom | |
// ImageZoom.jsx | |
import React from 'react' | |
import Image from 'gatsby-image' | |
import Zoom from 'react-medium-image-zoom' |
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
{% for activity in activities %} | |
<div class="post"> | |
{% if activity.strava_data['map']['polyline'] is not none %} | |
<div id="map_{{ activity.id }}" class="img-fluid" style="height: 300px;"></div> | |
{% endif %} | |
{# other activity data #} | |
</div> | |
{% endfor %} |
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
// @flow | |
import React from 'react'; | |
import styled from 'styled-components'; | |
type GlobalCssValues = 'initial' | 'inherit' | 'unset'; | |
type WrapValue = 'nowrap' | 'wrap' | 'wrap-reverse' | GlobalCssValues; | |
type JustifyValue = | |
| 'center' |
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
#!/usr/bin/env babel-node | |
import contentful from 'contentful' | |
import fs from 'fs-extra-promise' | |
// Requires a test to see if .env file exists because it will not on CI build | |
if (fs.existsSync('.env')) require('dotenv').config() | |
// Contentful Config | |
const apiToken = process.env.CONTENTFUL_DELIVERY_API_TOKEN |
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
#!/usr/bin/env babel-node | |
require('dotenv').config() | |
import contentful from 'contentful' | |
import fs from 'fs-extra-promise' | |
// Contentful Config | |
const apiToken = process.env.CONTENTFUL_DELIVERY_API_TOKEN | |
const spaceId = process.env.CONTENTFUL_SPACE_ID | |
const client = contentful.createClient({ accessToken: apiToken, space: spaceId }) |
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
// License: MIT - https://opensource.org/licenses/MIT | |
// Author: Michele Locati <[email protected]> | |
// Source: https://gist.github.com/mlocati/7210513 | |
function perc2color(perc) { | |
var r, g, b = 0; | |
if(perc < 50) { | |
r = 255; | |
g = Math.round(5.1 * perc); | |
} | |
else { |