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
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
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
# To print a str variable. | |
x/s ((PyStringObject*)str_var)->ob_sval | |
define ppstr | |
printf "%s\n", ((PyStringObject*)$arg0)->ob_sval | |
end | |
define ppr | |
printf "%s\n", ((PyStringObject*)PyObject_Repr($arg0))->ob_sval | |
end |
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 | |
IP="/bin/ip" | |
function prepare_rt_table() { | |
local rttables=/etc/iproute2/rt_tables | |
local iface=$1 | |
[[ "${iface}" = 'lo' ]] && return | |
if ! egrep -q "\s${iface}\s*"\$ $rttables; then | |
idx=$(wc -l <$rttables) |
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/sh | |
# | |
# Copyright (c) 2013 Izumi Tsutsui. All rights reserved. | |
# | |
# 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. | |
# 2. Redistributions in binary form must reproduce the above copyright |