Skip to content

Instantly share code, notes, and snippets.

View jmegs's full-sized avatar

John Meguerian jmegs

View GitHub Profile
@jmegs
jmegs / blobs.scss
Last active December 7, 2020 18:54
blobs under image thumbnails
// given html that looks like this
//
// <div class="project__thumbnail">
// <img class="project__image" />
// </div>
.project__thumbnail::after {
content: "";
position: absolute;
top: 50%;
@jmegs
jmegs / pangrams.json
Created September 28, 2020 21:38
array of pangrams
[
"Two driven jocks help fax my big quiz.",
"Fickle jinx bog dwarves spy math quiz.",
"Public junk dwarves hug my quartz fox.",
"Quick fox jumps nightly above wizard.",
"Five quacking zephyrs jolt my wax bed.",
"The five boxing wizards jump quickly.",
"Pack my box with five dozen liquor jugs.",
"The quick brown fox jumps over the lazy dog.",
"When zombies arrive, quickly fax judge Pat.",
@jmegs
jmegs / machine.js
Last active September 2, 2020 18:22
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions

Commercial Yeast Bread w/ Pre-Ferment

Doing a two-part mix imparts a lot more flavor from the longer fermentation.

1. Mix Pre-Ferment

Before bed, mix the following in a big bowl then cover and leave out overnight. The next morning it should have a bunch of bubbles on top and have a nice acidic / yeasty / alcoholic aroma.

1/4tsp Active Dry Yeast 105g Whole-wheat flour 120g water

@jmegs
jmegs / bread.md
Last active April 6, 2020 21:17
Sourdough bread recipe a la Josey Baker

1. Make pre-ferment

In a large bowl mix together the following and let sit out overnight or ~12 hours

  • 15g mature sourdough starter
  • 120g water
  • 105g whole wheat flour

2. Mix dough

To the bowl with the pre-ferment add the following, mix together, then let stand for 30min - 1hr

@jmegs
jmegs / theme.zsh-theme
Last active January 27, 2020 20:28
zsh theme test
local resetColor="%{$reset_color%}"
local logo="%{$fg_bold[white]%}◦$resetColor$resetColor"
local hostname=`hostname`
local dir="%{$fg_bold[white]%}%c$resetColor$resetColor"
GIT_PROMPT_PREFIX="[%{$fg_bold[white]%}\e[3m"
GIT_PROMPT_SUFFIX="%{%}$resetColor\e[0m] "
GIT_PROMPT_DIRTY="%{$fg_bold[red]%}"
GIT_PROMPT_CLEAN="%{$fg_bold[green]%}"
@jmegs
jmegs / Auto_Dark_Mode_Colors.py
Created October 22, 2019 17:44
script to switch item color theme with system dark mode
#!/usr/bin/env python3.7
"""
Auto_Dark_Mode_Colors auto set profile colors based on iTerm2 theme.
To configure, update the mapping in `PROFILE_PRESETS` such that the profile
name maps to the light and dark presets you'd like to use.
"""
import asyncio
import iterm2
export function useKeyEvent(code, keyFunction, deps) {
keyFunction = React.useCallback(keyFunction, deps)
React.useEffect(() => {
function pressKey(event) {
if (event.code === code) {
keyFunction(event)
}
}
document.addEventListener('keydown', pressKey)
return function removeListener() {
# Specify the preferences directory
defaults write com.googlecode.iterm2.plist PrefsCustomFolder -string "~/Dropbox/etc/iterm"
# Tell iTerm2 to use the custom preferences in the directory
defaults write com.googlecode.iterm2.plist LoadPrefsFromCustomFolder -bool true
[
{
"name": "easeInSine",
"css": "cubic-bezier(0.47, 0, 0.745, 0.715)"
},
{
"name": "easeOutSine",
"css": "cubic-bezier(0.39, 0.575, 0.565, 1)"
},
{