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
| mkdir -p pages | |
| # Render at 600 DPI | |
| pdftoppm -r 600 -png "Light-Mode.pdf" pages/page | |
| # Dark mode conversion | |
| for f in pages/*.png; do | |
| magick "$f" \ | |
| -colorspace HSL \ | |
| -channel Lightness \ |
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 sys | |
| import struct | |
| import zlib | |
| import gzip | |
| import tempfile | |
| import io | |
| import math | |
| from nbt import nbt |
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
| PROMPT='%{$fg[yellow]%}λ %m %{$fg[green]%}%c %{$fg[yellow]%}→ $(git_prompt_info)$(hg_prompt_info)$(virtualenv_prompt_info)%{$reset_color%}' | |
| ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}λ %{$fg[blue]%}git %{$fg[red]%}" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}" | |
| ZSH_THEME_HG_PROMPT_PREFIX="{$fg[yellow]%}λ %{$fg[blue]%}hg %{$fg[red]%}" | |
| ZSH_THEME_HG_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}" | |
| ZSH_THEME_VIRTUALENV_PREFIX="%{$fg[yellow]%}λ %{$fg[blue]%}venv %{$fg[red]%}" | |
| ZSH_THEME_VIRTUALENV_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}" |
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 zipfile, subprocess, re, sys | |
| from pathlib import Path | |
| if len(sys.argv) < 2: | |
| print("Usage: python convert.py <input.odt>") | |
| sys.exit(1) | |
| input_path = sys.argv[1] | |
| if not Path(input_path).exists(): |
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) { |
NewerOlder