Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:

Henry Bley-Vroman olets

:shipit:
View GitHub Profile
@olets
olets / zsh-plugin-manager-plugin-installation-procedures.md
Last active Nov 7, 2020
How to install a zsh plugin, for a variety of plugin managers
View zsh-plugin-manager-plugin-installation-procedures.md

zsh plugin manager plugin installation procedures

  • antibody: Add <owner>/<repo> to your plugins file. If you use static loading update the sh.

  • Antigen: Add antigen bundle <owner>/<repo> to your .zshrc.

  • Oh-My-Zsh:

    • Clone to OMZ's plugins' directory:
@olets
olets / past-present-or-future.twig
Created Jan 6, 2020
Twig: Determine if a date is past, present, or future
View past-present-or-future.twig
https://twigfiddle.com/ujg6hr
{% macro when(theDate = 'now', precision = 'd F Y') %}
{% set difference = 'now'|date(precision)|date('U') - theDate|date(precision)|date('U') %}
{{ difference == 0 ? 'now' : (difference > 0 ? 'past' : 'future') }}
{% endmacro %}
{% set currentDay = 'now'|date('d') %}
{% set currentMonth = 'now'|date('F') %}
{% set currentYear = 'now'|date('Y') %}
@olets
olets / mamp-php-on-macos-command-line.sh
Last active Feb 6, 2020
Make all MAMP PHPs available on command line, and default to the latest
View mamp-php-on-macos-command-line.sh
# Henry Bley-Vroman, 2019
#
# Usage
# Paste or source this into your shell profile.
# Requires macOS and that your shell supports [[ ]] and '<string> == <starting substring>*'
# (Bash, Zsh, Ksh etc)
# alias php to the latest PHP installed with MAMP
MAMP_PHP__LATEST=$(ls /Applications/MAMP/bin/php/ | sort -V | tail -1)
alias php="/Applications/MAMP/bin/php/${MAMP_PHP__LATEST}/bin/php -c \"/Library/Application Support/appsolute/MAMP PRO/conf/${MAMP_PHP__LATEST}.ini\""
@olets
olets / local-package-as-dependency.md
Last active Jan 6, 2020
Use local packages as dependencies
View local-package-as-dependency.md
View README.markdown

Gappy Grid is a flexbox grid system for building grids that have equal-width columns, equal-height rows, outer columns flush with the container's sides.

It supports arbitrary column gaps and row gaps, and breakpoint-specific column counts and gap sizes.

It has been tested on the oldest browsers I had handy access to when writing it: Chrome 68, Edge 14, Firefox 61, IE 11, Opera 51, Safari 11, and Safari on iOS 9.

Sassmeister: https://www.sassmeister.com/gist/e99c2a0ed632a8d8bafb8e81961f96bd

Codepen: https://codepen.io/henry/pen/dqYzEW?editors=1100

@olets
olets / 1--responsive-sizing-and-spacing.scss
Last active Aug 2, 2018
Sass styles for responsive sizing and spacing
View 1--responsive-sizing-and-spacing.scss
// ----
// Sass (v3.4.25)
// Compass (v1.0.3)
// ----
// VARIABLES
$widths: (
// devices
tablet-to-mobile: 768px//,
@olets
olets / README.md
Last active Jul 17, 2018
Simple Sass media query system and multi-stop grid system
View README.md

Simple Sass media query system and multi-stop grid system

Pen: https://codepen.io/henry/pen/JBXMgB

  1. Include (@import, or just paste in) the variables-- Sass files, and then the functions-- Sass files.
  2. Use them!
  • Media queries: in Sass, @include media(<one of the keys in $queries>) {…}
  • Grid:
    • Markup (Pug, in this demo)
@olets
olets / globals-in-twig.md
Last active Jan 6, 2020
Global variables in Twig
View globals-in-twig.md
@olets
olets / arpanet-maps.md
Last active Oct 23, 2020
ARPANET Maps
View arpanet-maps.md

Compiled from http://som.csudh.edu/fac/lpress/history/arpamaps/ and https://en.wikipedia.org/wiki/ARPANET

These maps are from Heart, F., McKenzie, A., McQuillian, J., and Walden, D., ARPANET Completion Report, Bolt, Beranek and Newman, Burlington, MA, January 4, 1978.


Folks -- I just scanned these in. They are too big, but right now I do not have the time to reduce them and try filtering out the noise. If someone does, please let me know. Larry (source: http://som.csudh.edu/fac/lpress/history/arpamaps/)

@olets
olets / nvm-ls-g
Last active Aug 9, 2020
List global packages for all nvm Nodes
View nvm-ls-g
#!/usr/bin/env sh
# nvm-ls-g
# Henry Bley-Vroman
# MIT License, 2018
# Lists the globally-installed npm packages
# for every nvm-installed version of Node
# Usage:
You can’t perform that action at this time.