#!/bin/bash
current_branch="$(git symbolic-ref --short HEAD)"
FORBIDDEN_BRANCHES=(master develop)
for forbidden_branch in "${FORBIDDEN_BRANCHES[@]}"; do
if [ "$current_branch" == "$forbidden_branch" ]; then
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
| from enum import Enum, EnumMeta, IntEnum, unique | |
| def not_callable_in_template(cls): | |
| """Disable the callable behavior of Enum in django templates""" | |
| cls.do_not_call_in_templates = True | |
| return cls | |
| class ChoiceEnumMeta(EnumMeta): |
mkdir cez_checker
cd cez_checker/
npm init --yes
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
| #!/bin/bash | |
| # Function taken from https://gist.github.com/cdown/1163649 | |
| # Install "urlencode" command from the "gridsite-clients" package if it doesn't work | |
| urlencode() { | |
| # Usage: urlencode <string> | |
| old_lc_collate=$LC_COLLATE | |
| LC_COLLATE=C |
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
| /** | |
| * The MIT License (MIT) | |
| * Copyright (c) 2022 PaperNick | |
| * | |
| * Resouces used: | |
| * https://github.com/auth0/node-jwks-rsa | |
| * https://github.com/auth0/node-jsonwebtoken | |
| * https://auth0.com/blog/navigating-rs256-and-jwks/ | |
| * https://gist.github.com/westmark/faee223e05bcbab433bfd4ed8e36fb5f | |
| * https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/ |
This is a helper script to make the process of transcribing with https://github.com/ggerganov/whisper.cpp model easier.
- Clone the https://github.com/ggerganov/whisper.cpp repo
- Follow the setup instructions
- Paste the
transcribe.shscript from this gist in the root dir ofwhisper.cppproject
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
| from pathlib import Path | |
| special_chars = ('<', '>', ':', '"', '/', '\\', '|', '?', '*', '/') | |
| def replace_all(text, items): | |
| for i in items: | |
| text = text.replace(i, '') | |
| return text |
This is a helper script to make the process of transcribing with guillaumekln/faster-whisper model easier.
- Create a venv
python -m venv venv - Activate the venv
source venv/bin/active - Install faster-whisper from PyPI
pip install faster-whisper - Download the faster-whisper-large-v2 model from Hugging Face
- How to change the background on Firefox to a dark one on new tab / loading screen ?
- Type
about:configin the URL bar - Search
toolkit.legacyUserProfileCustomizations.stylesheetsand double-click the field to set it totrue - Type
about:supportin the URL bar - Look for
Profile folderfield and click on the open button next to it.