Skip to content

Instantly share code, notes, and snippets.

View jonleopard's full-sized avatar
ಠ_ಠ

Jon Leopard jonleopard

ಠ_ಠ
View GitHub Profile
@jonleopard
jonleopard / GPG and git on macOS.md
Created September 3, 2018 08:18 — forked from danieleggert/GPG and git on macOS.md
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@jonleopard
jonleopard / README.md
Created June 19, 2018 10:25 — forked from DirtyF/README.md
Setup Jekyll on macOS with brew and rbenv - See https://jekyllrb.com/docs/installation/#macOS

Type this into your Terminal.app:

curl https://gist.githubusercontent.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3/raw/bbac59647ac66016cf443caf7d48c6ae173ae57f/setup-rbenv.sh | bash
@jonleopard
jonleopard / docker-cleanup-resources.md
Created May 9, 2018 12:30 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@jonleopard
jonleopard / update-images.sh
Created May 9, 2018 12:30 — forked from ColinLeverger/update-images.sh
Update all Docker images
docker images | grep -v REPOSITORY | awk '{print $1}' | xargs -L1 docker pull
@jonleopard
jonleopard / gatsby-node.js
Created March 30, 2018 16:56 — forked from resir014/gatsby-node.js
Simulate Jekyll's page generation on Gatsby!
// @ts-check
// Requires module: slug, gatsby-source-filesystem
const path = require('path')
const slugify = require('slug')
const { createFilePath } = require('gatsby-source-filesystem')
// Regex to parse date and title from the filename
const BLOG_POST_SLUG_REGEX = /^\/blog\/([\d]{4})-([\d]{2})-([\d]{2})-(.+)\/$/
@jonleopard
jonleopard / gist:3995775
Created November 1, 2012 19:11 — forked from padolsey/gist:527683
Javascript: Detect IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}