Skip to content

Instantly share code, notes, and snippets.

@Technblogy
Technblogy / gettree.bat
Created January 6, 2021 02:28
Generate windows directory structure file using tree command on mouse right content menu
REM check technblogy.com for details
@tree "%~1" /F /A | more /E /S +2 > "%~1\%~nx1.ctre"
@Technblogy
Technblogy / remove_c_style_comments.py
Last active January 5, 2021 12:36 — forked from ChunMinChang/remove_c_style_comments.py
Python: Remove C/C++ style comments #parser
#!/usr/bin/python
import re
import sys
import os.path
# Method 1: As described by saltycrane (https://www.saltycrane.com/blog/2007/11/remove-c-comments-python/):
# This regular expression was created by Jeffrey Friedl and later modified by Fred Curtis.
# Check the above link for details.
def removeComments(text):
""" remove c-style comments.