H4sIAAA... is the start of a base64-encoded gzipped string.
H4sI
H4sIA
H4sIAA
H4sIAAA
H4sIAAAA
H4sIAAAAA
H4sIAAAAAA
| #!/bin/bash | |
| for i in "$@"; | |
| do | |
| tmpfile=$(mktemp -u --suffix=.png) | |
| zopflipng "$i" "$tmpfile" && mv "$tmpfile" "$i" | |
| done |
| '' https://gist.github.com/countingpine/4e70fc94aab6aae041ade9a443863ba0 | |
| '' see also http://giflib.sourceforge.net/gif_lib.html | |
| '' see also https://gassend.net/spaceelevator/breaks/index.html -> https://gassend.net/spaceelevator/breaks/oscil2.c | |
| '' see also https://cpp.hotexamples.com/examples/-/-/gif_save/cpp-gif_save-function-examples.html ? | |
| #include "crt.bi" | |
| #include "gif_lib.bi" | |
| #define WID 100 | |
| #define HEI 32 |
| '' compile with fbc example1.bas gifwriter.bas | |
| #include once "gifwriter.bi" | |
| screen 13 | |
| dim s as string = !"Hello\nWorld!" | |
| dim g as GifWriter = GifWriter("hello.gif") | |
| g.setDefaultFrameDuration(10) |
| ' https://docs.microsoft.com/en-us/windows/desktop/winsock/complete-server-code | |
| #define WIN32_LEAN_AND_MEAN | |
| #include "win/winsock2.bi" | |
| #include "win/ws2tcpip.bi" | |
| const DEFAULT_BUFLEN = 512 | |
| const DEFAULT_PORT = 27015 | |
| const NEWLINE = !"\n" |
| $ID = 123456789 | |
| $PASSWORD = "%68%75%6e%74%65%72%32" | |
| $DIR = $env:USERPROFILE | |
| $WHATSMYIP_URL = "https://ifconfig.me/ip" | |
| $oldip = (Get-Content "$DIR\ddns-publicip.txt") | |
| $ip = (Invoke-RestMethod $WHATSMYIP_URL) | |
| if ($ip -ne $oldip) { |
| KBD English "United Kingdom - Apple" | |
| COPYRIGHT "(c) 2010 Stephane Moreau" | |
| COMPANY "Stephane Moreau" | |
| LOCALENAME "en-GB" | |
| LOCALEID "00000809" |
| #!/bin/bash | |
| # watch du output every 10s, return size in KB/MB/GB, difference in KB/MB | |
| # (Assumes du output is in KB) | |
| set -u | |
| path="${1:-.}" | |
| while du -s "$path"; do sleep 10; done | | |
| awk '{printf "%dK\t%dM\t%dG\t+%dK\t+%dM\n", $1, $1/1024, $1/1048576, ($1-old), ($1-old)/1024 ; old = $1}' |
| #!/bin/sh | |
| # https://redmine.pfsense.org/attachments/1440 | |
| # curl -s https://gist.githubusercontent.com/countingpine/3556e5ee09d56465ca9da081e202f46b/raw/_update_oui.sh | sh | |
| # | |
| # Run me to update the file in the package repo. | |
| # | |
| OUI_URL=http://standards-oui.ieee.org/oui/oui.txt | |
| OUI_FILE=/usr/local/share/nmap/nmap-mac-prefixes | |
| #OUI_FILE=nmap-mac-prefixes | |
| TEMP_FILE=/tmp/oui-prefixes.txt |
H4sIAAA... is the start of a base64-encoded gzipped string.
H4sI
H4sIA
H4sIAA
H4sIAAA
H4sIAAAA
H4sIAAAAA
H4sIAAAAAA
| # https://stackoverflow.com/a/58255859/446106 | |
| HOST=1.2.3.4 | |
| FILE1=foo.txt | |
| FILE2=bar.txt | |
| # Running the server on your host: | |
| python3 ./httpupload.py | |
| # Download a file from your host: |