Skip to content

Instantly share code, notes, and snippets.

@alfawal
alfawal / cs2-jump-throw.cfg
Last active September 18, 2023 07:49
Jump throw bind for Counter-Strike 2 (CS2)
alias "+boing" "+jump"
alias "+ding" "-attack; -attack2"
alias "+dong" "-jump"
bind "KEY" "+boing; +ding; +dong"
@alfawal
alfawal / layout.js
Created July 21, 2023 18:48
Custom font fallbacks are not allowed with next/font/google
import { Inter, Noto_Sans_Arabic } from "next/font/google";
const inter = Inter({
subsets: ["latin"],
});
const noto = Noto_Sans_Arabic({
subsets: ["arabic"],
});
@alfawal
alfawal / app.jsx
Created July 13, 2023 13:30
Wrong icon imported from react-icons due to duplicity
import * as Hi from "react-icons/hi"
export default function Component() {
return (
<>
<Hi.HiDocumentText />
</>
)
}
@alfawal
alfawal / colors.py
Created March 25, 2023 04:13
Python colors class
class Colors:
INFO = "\033[94m"
SUCCESS = "\033[92m"
WARNING = "\033[93m"
ERROR = "\033[91m"
YELLOW = "\033[33m"
PURPLE = "\033[95m"
SKY_BLUE = "\033[96m"
RESET = "\033[0m"
@alfawal
alfawal / .gitignore
Created October 16, 2022 15:02
My Hugo .gitignore
# Generated files by hugo
/public/
/resources/_gen/
/assets/jsconfig.json
hugo_stats.json
# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux
@alfawal
alfawal / do.sh
Created October 7, 2022 20:33 — forked from gkmngrgn/do.sh
Docker helper script
#!/usr/bin/env bash
BLUE="\\033[1;34m"
GREEN="\\033[1;32m"
NORMAL="\\033[0;39m"
RED="\\033[1;31m"
print_help() {
echo -e "${BLUE}Available environments${NORMAL}"
echo " - DEV (default)"
@alfawal
alfawal / .gitignore
Created September 17, 2022 11:52
My Python .gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
@alfawal
alfawal / .gitignore
Created September 16, 2022 18:41
My JS/Node .gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
@alfawal
alfawal / generate_secret_key_python.sh
Created May 22, 2022 10:47
Generate a secret key with Python
python3 -c "import secrets; print(secrets.token_hex(32))"
@alfawal
alfawal / generate_secret_key.sh
Last active May 22, 2022 10:41
Generate a secret key with Nodejs
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"