This file contains 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 .. |
This file contains 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 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 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 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
// | |
// main.cpp | |
// Test libCEC | |
// | |
// Created by Ryan Sullivan on 10/26/15. | |
// Copyright © 2015 Ryan Sullivan. All rights reserved. | |
// | |
#import <iostream> | |
#import <cec.h> |
This file contains 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 | |
brew tap | while read tap; | |
do | |
echo "brew tap $tap" | |
done | |
brew list | while read formula; | |
do | |
options=$(brew info --json=v1 $formula | jq '.[0] .installed | sort_by(.version) [0] .used_options | join(" ")' -r) |
This file contains 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
^(\d*)(\.(\d{0,2})?)?$/ |
This file contains 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 | |
class Generator { | |
protected $namespaces = []; | |
protected $outputDirectoriesPSR4 = []; | |
protected $aliasMapTypes = []; | |
protected $inputFiles = []; | |
/* | |
* Methods to setup the data we need to generate |
This file contains 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 | |
App::before(function($request) | |
{ | |
// determine the subdomain of the current request | |
$server = explode('.', Request::server('HTTP_HOST')); | |
$sansSubdomain = implode('.', array_slice($server, 1)); | |
// there are 3 parts to the domain (i.e. user.domain.com) | |
if (count($server) == 3) |
This file contains 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 | |
// Implementation | |
function iterate($original) | |
{ | |
$board = $original; | |
for ($x = 0; $x < count($board); $x++) { | |
$row = $board[$x]; | |
for ($y = 0; $y < count($row); $y++) { | |
$cell = $row[$y]; |
NewerOlder