Skip to content

Instantly share code, notes, and snippets.

View AppleBoiy's full-sized avatar
🍅
Tomata

Chaipat J. AppleBoiy

🍅
Tomata
View GitHub Profile
@AppleBoiy
AppleBoiy / requirements-dev.txt
Last active October 14, 2023 16:38
Tester package for python project
pytest
pytest-cov
pylint
flake8
black
@AppleBoiy
AppleBoiy / .pylintrc
Created October 14, 2023 16:26
pylint config file
[pylint]
disable = C0103, C0114, C0115, C0116, C0301, E0401, E0611, W0621
[MESSAGES CONTROL]
disable = missing-module-docstring
@AppleBoiy
AppleBoiy / setup.cfg
Last active October 14, 2023 20:08
setup config file for python package project
[metadata]
name =
version =
author = AppleBoiy
long_description = file: .github/README.md
long_description_content_type = text/markdown
url =
classifiers =
Development Status ::
Intended Audience :: Developers
@AppleBoiy
AppleBoiy / README.md
Last active October 16, 2023 14:37
(gh actions) codecov with pytest-cov

Running Tests with pytest-cov

To run tests and generate code coverage reports for your Python project

Configure Codecov Workflow

  1. Move the codecov/pyproject.toml to the root directory of your project.

  2. Move the codecov/codecov.yml to the .github/workflows directory in your project.

@AppleBoiy
AppleBoiy / alias_eza.md
Last active June 11, 2024 15:54
eza-ls

Alias eza for ls command

Put to shell configure file

first install eza by homebrew

brew install eza

Basic setup

[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
@AppleBoiy
AppleBoiy / README.md
Last active November 11, 2023 13:02
build.gradle for simple Java program

Gradle: Build Automation Tool

NOTE This method is quite advanced and is not recommended for beginners. It uses Gradle, a build automation tool, to compile and run complex programs that consist of multiple source-code files.

Project structure:

.
├── build.gradle
@AppleBoiy
AppleBoiy / Footer_.md
Last active February 5, 2024 06:50
Footer for markdown
@AppleBoiy
AppleBoiy / create_docker_group.md
Created November 21, 2023 06:45
ISSUE: Docker Rancher - Permission Denied when using docker from WSL

stackoverflow issue: https://stackoverflow.com/q/72528606/22440363

$ docker ps
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied

FIX

sudo addgroup --system docker
@AppleBoiy
AppleBoiy / README.md
Created November 30, 2023 18:08
add bits/stdc++.h to Mac

Bits/stdc++.h

This is a header file that includes every standard library. It is primarily used for competitive programming.

Platform Status
macOS

Installation