When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
#!/bin/bash | |
# | |
# Install specific version of a Homebrew formula | |
# | |
# Usage: brewv.sh formula_name desired_version | |
# | |
# Notes: | |
# - this will unshallow your brew repo copy. It might take some time the first time | |
# you call this script | |
# - it will uninstall (instead of unlink) all your other versions of the formula. |
--[[ | |
Name: HTTP Status Codes | |
Author: James Doyle <[email protected]> | |
Description: Easily find the code or name for HTTP statuses | |
Demo: https://cl.ly/0Y302M0z3G1x/Screen%20Recording%202018-04-20%20at%2002.14%20PM.gif | |
Installation: Just require this file in your Hammerspoon init.lua file | |
Usage: | |
Press the keybinding (ctrl+shift+H) and filter the results | |
Hitting enter on a choice will send you to the httpstatuses.com website | |
]]-- |
To enable TrueColor for Tmux, you must make sure that you have two things:
tmux -V
Here's an ecto changeset validation for urls:
@doc """
validates field is a valid url
## Examples
iex> Ecto.Changeset.cast(%ZB.Account{}, %{"website" => "https://www.zipbooks.com"}, [:website])
...> |> Utils.Changeset.validate_url(:website)
...> |> Map.get(:valid?)
# first install pygmentize to the mac OS X or macOS system with the built-in python | |
sudo easy_install Pygments | |
# then add alias to your ~/.bash_profile or ~/.bashrc or ~/.zshrc etc. | |
alias pcat='pygmentize -f terminal256 -O style=native -g' |
-- Catch fn-h and convert it to a left arrow key. | |
function catcher(event) | |
if event:getFlags()['fn'] and event:getCharacters() == "h" then | |
print("fn-h!") | |
return true, {hs.eventtap.event.newKeyEvent({}, "left", true)} | |
end | |
return false | |
end | |
local tapper=hs.eventtap.new({hs.eventtap.event.types.keyDown}, catcher):start() |
$ zmv -n '(.)(<->)(.[^.]#)' '$1$(($2+1))$3' # would rename x.0001.y to x.2.y. $ zmv -n '(.0#)(<->)(.[^.]#)' '$1$(($2+1))$3'
$ zmv '*' '${(L)f}'
$ autoload zmv