Skip to content

Instantly share code, notes, and snippets.

View luqmana's full-sized avatar

Luqman Aden luqmana

View GitHub Profile
#!/usr/sbin/dtrace -s
dtrace:::BEGIN
{
}
/* The link we're interested in. */
uint32 linkid;
string linkname;
#![allow(dead_code)]
use std::os::fd::AsRawFd;
extern "C" {
pub fn ioctl(fildes: i32, request: i32, ...) -> i32;
}
const VNIC_IOC_INFO: i32 = 0x1710003;
#!/bin/bash
set -eux
if [[ "$EUID" -ne 0 ]]; then
echo "Run as root"
exit
fi
# Physical link over which to simulate the Chelsio links
PHYSICAL_LINK="$(dladm show-phys -p -o LINK | head -1)"
#!/bin/bash
ip tuntap add dev wintestnet mode tap 2>/dev/null
ip link set dev wintestnet master vmbr 2>/dev/null
ip link set dev wintestnet up 2>/dev/null
# Edit these
WIN_IMAGE=/oxide/VMs/IMGs/windows.img
OVMF_PATH=/oxide/VMs/OVMF_CODE.fd
WIN_ISO=/lfs/ISOs/OSs/en_windows_10_business_editions_version_2004_updated_nov_2020_x64_dvd_29ee42db.iso
import builtins
import math
class BetterList(builtins.list):
def __getitem__(self, k):
if isinstance(k, slice):
if k.start == None and k.step == None:
if k.stop == 0.0:
if math.copysign(1.0, k.stop) == -1.0:
return self
[package]
name = "foo"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
WORK_DIR=/home/luqman/Develop/webcam-bg
# Cleanup everything on exit
function cleanup_func {
sleep 0.5
echo cleanup
}
trap "exit \$exit_code" INT TERM
<domain type='kvm' id='14' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>win10</name>
<uuid>7b7a4d76-beaf-46be-9ff4-9f025a14755a</uuid>
<title>Windows 10</title>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>8388608</currentMemory>
<vcpu placement='static'>8</vcpu>
<iothreads>1</iothreads>
<cputune>
<vcpupin vcpu='0' cpuset='2'/>
<domain type='kvm' id='14' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>win10</name>
<uuid>7b7a4d76-beaf-46be-9ff4-9f025a14755a</uuid>
<title>Windows 10</title>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>8388608</currentMemory>
<vcpu placement='static'>8</vcpu>
<iothreads>1</iothreads>
<cputune>
<vcpupin vcpu='0' cpuset='2'/>