Skip to content

Instantly share code, notes, and snippets.

View ryanprior's full-sized avatar

Ryan Prior ryanprior

View GitHub Profile
@ryanprior
ryanprior / magit-diff-colors.el
Created November 20, 2020 19:45
Tropical high-contrast colors for Magit diffs
;; removed code is orchid on warm violet
(set-face-attribute 'magit-diff-removed nil :background "#2d1523" :foreground "#be749f")
(set-face-attribute 'magit-diff-removed-highlight nil :background "#4c243b" :foreground "#dbb3ca")
;; added code is banana cream on cool dusty violet
(set-face-attribute 'magit-diff-added nil :background "#291f2e" :foreground "#f5cf75")
(set-face-attribute 'magit-diff-added-highlight nil :background "#2c1f33" :foreground "#f7d991")
def animal_song (farm)
result = farm.keys.reduce(
{ verses: [] of Array(String), words: [] of String }
) do |result, animal|
verse = [] of String << "old mac had farm, on it #{animal}" << "with #{farm[animal]}"
verse << "here #{farm[animal]}" if result[:words].empty?
verse.concat(result[:words].reverse)
{
verses: result[:verses] << verse,
words: result[:words] << "and #{farm[animal]}"
@ryanprior
ryanprior / gix
Created September 30, 2021 22:32
#!/usr/bin/env bash
set -eu
[[ -f requirements.txt || -f Pipfile ]] && python="python-" || python=""
[[ $python == "" && -f Gemfile ]] && ruby="ruby-" || ruby=""
pkg="$1"
shift