Skip to content

Instantly share code, notes, and snippets.

View echoechoin's full-sized avatar
:octocat:
nothing

echo echoechoin

:octocat:
nothing
  • chengdu, 成都
View GitHub Profile
/* SPDX-License-Identifier: BSD-2-Clause
Copyright (c) 2026
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
@echoechoin
echoechoin / delete_comments.md
Created January 8, 2022 18:15
A good way to delete comments from any programming language

A good way to delete comments from any programming language

I find a good way to delete comments from any programming language.

While using bat command, I found it can highlight the code. It was using a library called syntect in rust. But I'm not familiar with rust. So I decided to find a python highlight library. Finally, I found pygments.

It is simple to use and it can delete comments from any programming language easily. Take Python code as an example: