This file contains hidden or 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
^[^\s]*[^\x00-\x7F][^\s]*$\n # Also remove lines with whitespaces | |
^[^\n\r]*[^\x00-\x7F][^\n\r]*$\n # Lines may include whitespaces |
This file contains hidden or 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
echo "" | |
docker container ls --all -q | | |
xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAMConfig.IPv4Address}}{{end}} | {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} | {{ .Name }}' | | |
sort | | |
sed '1 iCustom IP | Current IP | Container\n||' | | |
column -t -s "|" |
This file contains hidden or 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
with open("wc.lst", "w") as wordlist: | |
for year in range(2003, 2024): | |
for month in range(1,13): | |
for num in range(1, 20): | |
wordlist.write(f"RA{year}-{month}-{num}\n") | |
#gobuster fuzz -w wc.lst -u https://www.mlit.go.jp/jtsb/railway/rep-acci/FUZZ.pdf --excludestatuscodes 404 -o out.lst |
This file contains hidden or 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/zsh | |
# | |
# Copies all sources to target host | |
# ================================= | |
# | |
# Copies all folders in ./sources to the target. | |
# These folder entries (seperated by newlines) | |
# should not end with a slash. If they do, only the | |
# files inside the folder are backed up, not the | |
# folder itself. Make sure that there are no |
This file contains hidden or 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
docker ps -a --format '{{ .ID }}' | xargs -I {} docker inspect -f '{{ .Name }}{{ printf "\n" }}{{ range .Mounts }}{{ printf "\n\t" }}{{ .Type }} {{ if eq .Type "bind" }}{{ .Source }}{{ end }}{{ .Name }} => {{ .Destination }}{{ end }}{{ printf "\n" }}' {} |
This file contains hidden or 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
echo "" | |
echo "" | |
echo "====== FILE PULLER ======" | |
echo "" | |
echo "" | |
$index = 0 | |
if (Test-Path ./status) { | |
$confirmation = $Host.UI.PromptForChoice("", "It appears the last operation was interrupted. Continue?", @("&Continue", "&Restart", "&Exit"), 0) | |
if ($confirmation -eq 0) { |
This file contains hidden or 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
7z u old.zip -u- -up0q0x2!new.zip /foler_to_backup/ | |
# https://sevenzip.osdn.jp/chm/cmdline/switches/update.htm | |
# Flags: | |
# p0,q0 = dont copy files not existing on disk | |
# x2 = compress files from disk even if they are newer in the archive | |
# Inherited by -u: | |
# r2 = compress files not in archive |
This file contains hidden or 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
import os | |
import subprocess | |
import cv2 | |
from jinja2 import Template | |
from rich.progress import Progress, BarColumn, TimeRemainingColumn, TextColumn, SpinnerColumn | |
from rich.traceback import install as install_traceback | |
from rich.console import Console | |
install_traceback() | |
print = Console().print |
This file contains hidden or 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
TextGrid[VALS = | |
Cases[Apply[ | |
Flatten[{#1, {"StandardYear", "Value", | |
"StandardUncertainty"} /. #2}] &, | |
Entity["PhysicalConstant", "GravitationalConstant"][ | |
"ValueAssociation"], {1}], {source_, y_Integer, | |
rest__} :> {source, DateObject[{y}], rest}], | |
Sequence[Dividers -> All, | |
Background -> {Automatic, {{LightBlue, None}}}]] | |
hvals = Callout[{#2, |
This file contains hidden or 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
SIConstants = EntityList[EntityClass["PhysicalConstant", "SIExact"]]; | |
TextGrid[Join[{Thread[ | |
Style[{"constant", "symbol", "new exact value"}, Italic]]}, | |
EntityValue[SIConstants, {"Entity", "Quantity", "Value"}] /. | |
Quantity[1, Pattern[u, Blank[]]] :> Quantity[None, u]], | |
Sequence[Dividers -> All, | |
Background -> {Automatic, {LightYellow, {LightBlue, None}}}]] |
NewerOlder