https://gist.github.com/a-rodin/fef3f543412d6e1ec5b6cf55bf197d7b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ~/.config/nvim/lua/plugins/debugging.lua | |
-- https://github.com/mfussenegger/nvim-dap | |
-- https://github.com/jay-babu/mason-nvim-dap.nvim | |
return { | |
"mfussenegger/nvim-dap", | |
dependencies = { | |
"vadimcn/codelldb", -- lldb | |
"Microsoft/vscode-cpptools", -- gdb | |
"rcarriga/nvim-dap-ui", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SELF="${0##*/}" | |
DEBUG=false | |
OBJ= SYM= PREFIX= | |
dbg() { $DEBUG && echo >&2 "# $@" ; } | |
die() { echo >&2 "ERROR: $@" ; exit 1 ; } | |
showhelp() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
die() { echo >&2 "$@" ; exit 1 ; } | |
TGT_IP="$1" | |
TGT_PORT=${2:-6666} | |
if [ -z "$TGT_IP" ] ; then | |
TTY=${SSH_TTY#/dev/} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" this file goes in ~/.config/nvim/init.vim | |
" you will also need to install vim-plug in ~/.local/share/nvim/site/autoload/plug.vim | |
" see https://github.com/junegunn/vim-plug?tab=readme-ov-file#unix-linux | |
" on first run, use :PlugInstall to download all packages | |
" then reload config with ,so (or restart nvim) | |
syntax on | |
filetype plugin indent on | |
"let mapleader = ',' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#if 0 | |
set -e | |
src=$0 | |
tmp=/tmp/$$.cpp | |
exe=/tmp/$$ | |
sed -e 1d < $src > $tmp | |
trap "rm -f $tmp $exe" EXIT | |
( set -x ; g++ -o $exe $tmp ) | |
$exe "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this script will remove any stale kernel- and kernel-headers- packages | |
# it will keep the current (uname -r) and latest kernel package and its headers | |
SUDO=sudo | |
while [ -n "$1" ] ; do | |
case "$1" in | |
-h) echo "${0##*/} [ -h ] [ -n ]" ; exit 0 ;; | |
-n) SUDO=echo ;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# https://superuser.com/questions/413349/limiting-use-of-ram-in-chrome | |
import sys, os, psutil | |
limit = 200 #default 200MB | |
if len(sys.argv) == 2: | |
try: | |
limit = int(sys.argv[1]) | |
except: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat ~/.gdbinit | |
# GEF | |
# https://gef.readthedocs.io/en/master/ | |
# | |
# https://github.com/hugsy/gef | |
# Voltron | |
# https://github.com/snare/voltron | |
# | |
# git clone https://github.com/snare/voltron |
NewerOlder