Skip to content

Instantly share code, notes, and snippets.

View Snape3058's full-sized avatar
🐱
Is playing with cats.

Ella Ma Snape3058

🐱
Is playing with cats.
View GitHub Profile
@Snape3058
Snape3058 / cocci-pretty-print.py
Created September 13, 2024 14:55
A code snippet to pretty print a position in cocci file.
org = open(p[0].file).read().split("\n")[int(p[0].line) - 1]
prt = org.lstrip()
print("%s:%s:%s: cocci: found" % (p[0].file, p[0].line, p[0].column))
print("%s | %s" % (p[0].line, prt))
print(
"%s | %s%s"
% (
" " * len(p[0].line),
" " * (int(p[0].column) - (len(org) - len(prt))),
"^" * (int(p[0].column_end) - int(p[0].column)),
@Snape3058
Snape3058 / kneeEstradiol2.svg
Created November 3, 2017 09:09 — forked from anonymous/kneeEstradiol2.svg
I would have been stronger with Progynova GNU/Linux-libre instead of the nonfree-containing Debian!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Snape3058
Snape3058 / .gdbinit
Last active August 29, 2015 14:22 — forked from skyscribe/.gdbinit
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file