This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"values": [ | |
"minecraft:apple", | |
"minecraft:baked_potato", | |
"minecraft:beef", | |
"minecraft:beetroot", | |
"minecraft:beetroot_soup", | |
"minecraft:bread", | |
"minecraft:carrot", | |
"minecraft:chicken", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sed -rf- -- "$@" <<-EOF | |
s/([^#]*)#.*$/\1/ # remove comments | |
s/^\s*//;s/\s+$// # strip leading and trailing whitespace | |
/^$/d # remove blank lines | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections.abc import Hashable, Iterable, Iterator | |
def unique[T: Hashable](items: Iterable[T]) -> Iterator[T]: | |
seen = set() | |
for item in items: | |
if item not in seen: | |
seen.add(item) | |
yield item |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following file is a copy of <https://github.com/syhw/homebrew/blob/master/Library/Contributions/example-formula.rb>. | |
# I found this useful, so I uploaded it as a Gist so I can easily find it again. | |
# Copyright 2009-2015 Homebrew contributors. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# | |
# 1. Redistributions of source code must retain the above copyright |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################# | |
# Cross-Shell Environment Variable Configuration using Xshe # | |
# https://github.com/superatomic/xshe # | |
############################################################# | |
# Xshe allows for setting environment variable across multiple shells: | |
PS1 = '> ' | |
# These lines add the environment variables for the XDG Base Directory Specification. | |
# (https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################################## | |
## ======================================================================================== ## | |
## ⚠️ THIS FILE IS OUTDATED; DO NOT USE IT! ## | |
## ⚠️ UPDATED VERSION: https://gist.github.com/superatomic/52a46e53a4afce75ede4db7ba6354e0a ## | |
## ======================================================================================== ## | |
############################################################################################## | |
# Original file contents is as follows: | |
############################################################# |