-
At the root of the repository, create a
.prettierrc
file:{ "plugins": ["prettier-plugin-go-template"], "overrides": [ { "files": ["*.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
python3 -m venv .venv | |
source .venv/bin/activate |
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
// NB: The first value in the list is the smallest bit (a.k.a "little endian"). | |
template<int Size> | |
constexpr auto make_bitset(const std::initializer_list<bool> &boolean_list) { | |
auto bits = 0ul; | |
auto mask = 1ul; | |
for (auto boolean : boolean_list) { | |
bits |= boolean ? mask : 0ul; | |
mask <<= 1; | |
} | |
return std::bitset<Size>{bits}; |
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
python3 -m venv .venv | |
.\venv\Scripts\activate.bat |
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
import os | |
import sys | |
import getopt | |
import glob | |
import os.path | |
import fnmatch | |
from os import listdir | |
from os.path import isfile, join | |
from PyPDF2 import PdfFileReader, PdfFileWriter |
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
zip -r output.zip path/to/input_folder -x ".DS_Store" -x "__MACOSX" |
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
# Remove a remote branch. | |
git push <remote> --delete <branch> | |
# Remove a local branch. | |
git branch --delete <branch> | |
git branch --delete --force <branch> | |
# Remove a local tracking branch. | |
git branch --delete --remotes <remote>/<branch> | |
git fetch <remote> --prune |
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
# Gitlab | |
git push https://gitlab-ci-token:<YOUR_TOKEN>@gitlab.com/<GROUP_NAME>/<REPO_NAME>.git <BRANCH_NAME> [--force] | |
# Github | |
git push https://<USERNAME>:<YOUR_TOKEN>@github.com/<USERNAME>/<REPO_NAME> <BRANCH_NAME> [--force] |
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
find . \( -iname \*.jpg -or -iname \*.jpeg \) -print0 | xargs -P 4 -n 1 -0 jpegoptim |
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
git fetch other-remote | |
git merge other-remote/some-branch |
NewerOlder