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
<?php | |
$path = '/Volumes/drive/path.dat'; | |
$write_to = '/tmp/output.dat'; | |
$fh_out = fopen($write_to, 'w+'); | |
clearstatcache(); | |
while (!file_exists($path)) { | |
sleep(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
function set_bourne | |
set --local line $argv[1] # the line X=Y | |
set --local exp $argv[2] # 1/0: export the variable | |
set --local key (echo $line | perl -pe 's/^([A-Za-z0-9_]+)=(.*)/$1/g') | |
set --local dataraw (echo $line | perl -pe 's/^([A-Za-z0-9_]+)=(.*)/$2/g') | |
set --local data $dataraw | |
# echo "in set_bourne for $key with $exp" | |
# echo "old value: $$key" |
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
let app = Application('Safari'); | |
app.includeStandardAdditions = true; | |
let finalText = ""; | |
for (var i = 0; i < app.windows.length; i += 1) { | |
for (var j = 0; j < app.windows[i].tabs.length; j += 1) { | |
finalText += "[" + app.windows[i].tabs[j].name() + "]: " + app.windows[i].tabs[j].url() + "\n"; | |
} | |
finalText += "\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
# This documents how you would take a Debian 12 cloud image and make a Proxmox template out of it. | |
# This script isn't really meant to be executed, but more as a reference and copy/paste for each step. | |
# Enjoy! | |
# Download the image | |
mkdir -p ~/debian-bookworm-build/original && cd ~/debian-bookworm-build/original | |
wget 'https://cloud.debian.org/images/cloud/bookworm/20240717-1811/debian-12-genericcloud-amd64-20240717-1811.qcow2' | |
cd .. |
OlderNewer