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
// 1. Copy the gist below, and replace mastodon.social with your own instance | |
// 2. Go to https://rknightuk.github.io/mastodon-toot-bookmarklet/ and create your bookmarklet | |
// 3. Edit the bookmarklet, and replace the URL with the one from step 1 | |
javascript:void(window.open('https://mastodon.social/share?text='+encodeURIComponent(document.title)+'%250A'+encodeURIComponent(window.location.href)+(window.getSelection().toString() ? ' %250A' + encodeURIComponent(window.getSelection().toString()): ''), '_blank','width=600,height=600,toolbar=no')) |
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
[tool.poetry] | |
name = "my-project" | |
version = "0.1.0" | |
description = "It's my project, yo" | |
authors = ["gotofritz <[email protected]>"] | |
license = "MIT" | |
readme = "README.md" | |
homepage = "https://github.com/gotofritz/my-project" | |
repository = "https://github.com/gotofritz/my-project" |
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
PYTHON_VERSION ?= 3.10.4 | |
CMD := poetry run | |
SRC_DIR := src | |
TESTS_DIR := tests | |
help: ## Display this help | |
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) | |
.PHONY: help | |
lint-mypy: ## checks src and tests with mypy |
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
brew reinstall bzip2 | |
brew reinstall zlib | |
CPPFLAGS="-I$(brew --prefix bzip2)/include -I$(brew --prefix zlib)/include" \ | |
LDFLAGS="-L$(brew --prefix bzip2)/lib -L$(brew --prefix zlib)/lib" \ | |
pyenv install --patch 3.6.4 < <(curl -sSL https://github.com/python/cpython/commit/8ea6353.patch\?full_index\=1) |
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
# ~/Library/Application\ Support/jesseduffield/lazydocker/config.yml | |
reporting: "on" | |
customCommands: | |
services: | |
- name: start | |
attach: false | |
command: docker-compose up -d {{ .Service.Name }} |
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
# ffmpeg snippets | |
# ffmpeg-slowdown.sh: slow down all files in a directory | |
# ffmpeg-to-mp3.sh: convert all video files in a directory to mp3 | |
# handbrake-bulk.sh: convert all webm fils in a folder to mp4 |
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
# Creates a simple CRA project, removing some of the unnecessary files | |
# (Eventually I will build a proper tool to do this, but in the meantime...) | |
# ensure there is a project name to build | |
if [[ $1 == '' ]]; then | |
echo 'Usage: cra the_name_of_a_folder_you_want_created' | |
exit | |
fi | |
project_name=$1 |
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
# given that $PACKAGE is the package about which you want to find out more | |
# this lists only the modules you have installed | |
npm ls | |
# list available versions of $PACKAGE | |
# note the plural, versionS - without it, you only get the current version | |
npm show $PACKAGE versions | |
# this finds the latest version of your package as well as other with similar names |
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
// quick and dirty snippet to creates a gitlab markdown table of contents for a README.md page | |
// preview gitlab page and paste in browser console | |
var str = ""; | |
$('.file-content') | |
.find('h1, h2, h3, h4, h5, h6, h7') | |
.each((i, node) => { | |
// node.tagName is H1 H2... | |
let indent = Number(node.tagName[1]) - 1; | |
// markdown mested lists are | |
// - xxx |
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
# gives you the directory in which the running script is | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
NewerOlder