This file contains hidden or 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
""" | |
Goes through all the markdown files in a folder and adds the | |
yyyy-mm-dd- prefix to the filename, in the slug: in the | |
front matter | |
""" | |
#!/usr/bin/env python3 | |
import os | |
import re | |
import sys |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
# Bulk Resolve Conflics | |
# Changing username after a commit | |
# Compare Versions | |
# Delete A Branch | |
# Empty Dirs | |
# Get Info | |
# Ignore A File That Was Already Pushed | |
# Log With Actual Changes | |
# Log With List Of Files | |
# Move Commits To Another Branch |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<!-- charset always before title to avoid UTF-7 exploits --> | |
<meta charset="utf-8"> | |
<title>title</title> | |
<link rel="stylesheet" href="css.css"> | |
</head> | |
<body> | |
This file contains hidden or 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
.preventSelect { | |
-moz-user-select: -moz-none; | |
-khtml-user-select: none; | |
-webkit-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} |
This file contains hidden or 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
//random color | |
//from: http://www.mrspeaker.net/2013/03/08/random-hex-colour/ | |
//16777216 = 1 << 24 | |
// ES5 | |
function random_color(){ | |
return '#'+ ( '00000' + ( Math.random() * 16777216 | 0 ).toString( 16 ) ).slice( -6 ); | |
} | |
// ES6 |
This file contains hidden or 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
#sort files by number of lines | |
find /path/to/folder -name '*.js' | xargs wc -l | sort |
NewerOlder