Skip to content

Instantly share code, notes, and snippets.

@kylechase
kylechase / lsiommu
Created March 20, 2024 15:58 — forked from flungo/lsiommu
List the devices and their IOMMU groups.
#!/bin/bash
for d in $(find /sys/kernel/iommu_groups/ -type l | sort -n -k5 -t/); do
n=${d#*/iommu_groups/*}; n=${n%%/*}
printf 'IOMMU Group %s ' "$n"
lspci -nns "${d##*/}"
done;
@kylechase
kylechase / proxmox-tb-net.md
Created February 13, 2024 22:40 — forked from scyto/proxmox-tb-net.md
Thunderbolt Networking Setup

Thunderbolt Networking

this gist is part of this series

NOTE FOR THIS TO BE RELIABLE ON NODE RESTARTS YOU WILL NEED PROXMOX KERNEL 6.2.16-14-pve OR HIGER

This fixes issues i bugged with the thunderbolt / thunderbolt-net maintainers (i will take everyones thanks now, lol)

Install LLDP - this is great to see what nodes can see which.

  • install lldpctl with apt install lldpd

converted Virtualbox Win7 VM to KVM. (KVM on Ubuntu 14.04)

  • Shutdown Virtualbox VM.

  • Convert the vdi to a raw disk images. Note: vdi are compressed and raw images are not and so you will need to leave enough disk space for entire uncompressed disk.

VBoxManage clonehd --format RAW win7.vdi win7.img
  • Then on your KVM host:
@kylechase
kylechase / iSCSI_cheatsheet.md
Created December 19, 2023 19:10 — forked from albertomolina/iSCSI_cheatsheet.md
iSCSI cheatsheet

iSCSI server with tgt

apt install tgt

Manual configuration of targets

Create a new target named "target1":

tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2020-01.es.tinaja:target1

Delete a specific target:

INFO | jvm 1 | 2020/07/16 19:59:48 | java.lang.NullPointerException: null
INFO | jvm 1 | 2020/07/16 19:59:48 | at com.inductiveautomation.ignition.gateway.logging.SQLiteAppenderReader.getConnection(SQLiteAppenderReader.java:83)
INFO | jvm 1 | 2020/07/16 19:59:48 | at com.inductiveautomation.ignition.gateway.logging.SQLiteAppenderReader.query(SQLiteAppenderReader.java:150)
INFO | jvm 1 | 2020/07/16 19:59:48 | at com.inductiveautomation.ignition.gateway.logging.GatewayLoggingManagerImpl.queryLogEvents(GatewayLoggingManagerImpl.java:144)
INFO | jvm 1 | 2020/07/16 19:59:48 | at com.inductiveautomation.ignition.gateway.web.pages.status.routes.LoggingRoutes.getLogs(LoggingRoutes.java:561)
INFO | jvm 1 | 2020/07/16 19:59:48 | at com.inductiveautomation.ignition.gateway.dataroutes.Route.service(Route.java:252)
INFO | jvm 1 | 2020/07/16 19:59:48 | at com.inductiveautomation.ignition.gateway.dataroutes.RouteGroupImpl.service(RouteGroupImpl.java:61)
version: "3.2"
services:
wordpress:
image: wordpress
volumes:
- type: volume
source: www-data
target: /var/www/html
expose:
- 80
from javax.swing.border import LineBorder
from java.awt import Color
event.source.putClientProperty("origBorder",event.source.border)
event.source.border = LineBorder(Color.BLUE,3)
@kylechase
kylechase / isAccepting
Created July 14, 2015 22:14
websf isAccepting
public boolean isAccepting() {
Date now = new Date();
if (sender != null && sender.isAvailable && (now.getTime() - lastSend.getTime()) > frequencyMS){
log.infof("Sending data. Current Time - %s *** Last Send - %s *** Limit %s ms",now.toString(),lastSend.toString(),frequencyMS.toString());
lastSend = (Date) now.clone();
return true;
} else {
return false;
import zipfile
zile = system.file.saveFile("temp.zip")
myzip = zipfile.ZipFile(zile,'w')
invoiceId = event.source.parent.getComponent('Container').getComponent('tblInvoices').selectedInvoice
invoiceFile = system.file.getTempFile("pdf")
bytes = event.source.parent.getComponent('Report Viewer Labour').getBytesPDF()
system.file.writeFile(invoiceFile,bytes)
invoiceName = "000000" + str(invoiceId)