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
# Spinners | |
Perl Spinner/Heartbeat demonstrator (Unicode complaint) | |
perl -CO -Mutf8 -e '$|=1; $c=" ▏▎▍▌▋▊▉█"; | |
while(1){ for $i ($c=~/(.)/g) { | |
print " $i\r"; select(undef,undef,undef,.1+1/length($c)); } };' |
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
.▄▄ · ·▄▄▄▄▄▄▄▄·▄▄▄▄ ▪ .▄▄ · ▄▄▄▄▄ | |
▐█ ▀. ▪ ▐▄▄·•██ ██▪ ██ ██ ▐█ ▀. •██ | |
▄▀▀▀█▄ ▄█▀▄ ██▪ ▐█.▪▐█· ▐█▌▐█·▄▀▀▀█▄ ▐█.▪ | |
▐█▄▪▐█▐█▌.▐▌██▌. ▐█▌·██. ██ ▐█▌▐█▄▪▐█ ▐█▌· | |
▀▀▀▀ ▀█▄▀▪▀▀▀ ▀▀▀ ▀▀▀▀▀• ▀▀▀ ▀▀▀▀ ▀▀▀ |
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
function .env.gh.runners -d 'Turn on Github Runner Daemons' -a do | |
if test -n "$do" | |
switch $do | |
case "-init" | |
$HOME/Documents/runner/mck/actions-runner/run.sh & | |
$HOME/Documents/runner/lyns/actions-runner/run.sh & | |
$HOME/Documents/runner/lyns/softdist/actions-runner/run.sh & | |
case "-exit" | |
pkill -f 'run.sh' | |
case "" |
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
private async containerAttachment(containerId: string) { | |
try { | |
log(bgBlue(`🔗 Attaching to container: ${containerId}`)); | |
// Check if already attached to avoid duplicate locks | |
if (this.isAttached) { | |
log(yellow(`⚠️ Already attached to container: ${containerId}`)); | |
return; | |
} | |
this.isAttached = true; // Set flag to prevent duplicate attach calls |
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
Checking Docker daemon... | |
GET /info HTTP/1.1 | |
Host: docker | |
Accept: application/json | |
SyntaxError: Bad control character in string literal in JSON at position 8042 (line 1 column 8043) | |
at JSON.parse (<anonymous>) | |
at ConnectionClient.parseResponseBody (https://jsr.io/@rainypixel/docker-api-ts/0.1.2/client/connection.ts:123:31) | |
at DockerClient.makeRequest (https://jsr.io/@rainypixel/docker-api-ts/0.1.2/client/docker.ts:78:37) | |
at eventLoopTick (ext:core/01_core.js:177:7) | |
at async main (file:///Users//Documents/gh/lotsofthoughts/install/deno/run.ts:11:25) |
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 { writeFileStr, readFileStr } from "https://deno.land/std/fs/mod.ts"; | |
import { crypto } from "https://deno.land/std/crypto/mod.ts"; | |
async function encryptAndSave(results: any[], keyFile: string, dataFile: string) { | |
// Generate a random 256-bit (32 bytes) key and IV | |
const key = crypto.getRandomValues(new Uint8Array(32)); // AES-256 | |
const iv = crypto.getRandomValues(new Uint8Array(16)); // AES block size | |
// Convert results to JSON string | |
const resultsJSON = JSON.stringify(results); |
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
#!/usr/bin/env bash | |
# -u Treat unset variables as an error when substituting them | |
# -e Exit immediately on Error. | |
# -x Print commands and their arguments as they are read | |
# -v Print shell input lines as they are read | |
# -B Perform brace expansion and | |
# -n read commands but do not execute them (dry run) | |
# -a mark variables which are modified or created for exporting | |
set -e |
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
#!/usr/bin/env bash | |
# -u Treat unset variables as an error when substituting them | |
# -e Exit immediately on Error. | |
# -x Print commands and their arguments as they are read | |
# -v Print shell input lines as they are read | |
# -B Perform brace expansion and | |
# -n read commands but do not execute them (dry run) | |
# -a mark variables which are modified or created for exporting | |
set -e |
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
# Ensure libintl.h and libintl.so are available to osxcross | |
RUN ln -sf /usr/include/libintl.h /osxcross/target/include/libintl.h | |
RUN ln -sf /usr/lib/libintl.so /osxcross/target/lib/libintl.so | |
# Set environment flags to include libintl paths | |
ENV CXXFLAGS="$CXXFLAGS -I/osxcross/target/include" | |
ENV LDFLAGS="$LDFLAGS -L/osxcross/target/lib -lintl" | |
# CMake build | |
RUN cmake -G Ninja \ |
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
function .gpg.key.create --description 'GPG: Create a key' | |
gpg --full-gen-key | |
end | |
function .gpg.key.export --description 'GPG Key Export' --argument email filename | |
gpg -a --export $email > "$filename.pub.key" | |
gpg -a --export-secret-keys $email > "$filename.secret.key" | |
end | |
function .gpg.key.list --description 'List GPG Keys' | |
gpg --list-secret-keys --keyid-format LONG | |
end |