Skip to content

Instantly share code, notes, and snippets.

View kaelemc's full-sized avatar
😴
Working Hard (Hardly Working)

Kaelem kaelemc

😴
Working Hard (Hardly Working)
View GitHub Profile
#!/bin/bash
CS_REPO="https://github.com/eda-labs/codespaces"
if git rev-parse --show-toplevel &>/dev/null; then
TARGET_DIR=$(git rev-parse --show-toplevel)
REPO_NAME=$(basename "$TARGET_DIR")
echo "Detected git repository: $REPO_NAME"
else
TARGET_DIR=$(pwd)
@kaelemc
kaelemc / ncs.conf
Created January 19, 2025 11:21
ncs.conf for NSO on Containerlab
<?xml version="1.0"?>
<!-- -*- nxml -*- -->
<!-- Generated by NSO in Docker startup script -->
<ncs-config xmlns="http://tail-f.com/yang/tailf-ncs-config">
<!-- NCS can be configured to restrict access for incoming connections -->
<!-- to the IPC listener sockets. The access check requires that -->
<!-- connecting clients prove possession of a shared secret. -->
<ncs-ipc-access-check>
<enabled>false</enabled>
<filename>${NCS_CONFIG_DIR}/ipc_access</filename>
2025-01-15 03:46:00,190: launch  INFO Parsed SR OS version: SROSVersion(magc=False, version='24.10.R1', major=24, minor=10, patch='1')
2025-01-15 03:46:00,191: launch  INFO License found
2025-01-15 03:46:00,191: launch  DEBUG Raw SR OS variant: {'deployment_model': 'integrated', 'min_ram': 5, 'max_nics': 12, 'timos_line': 'slot=A chassis=sr-1 card=cpm-1 mda/1=me12-100gb-qsfp28', 'card_config': '\n/configure card 1 card-type iom-1\n/configure card 1 mda 1 mda-type me12-100gb-qsfp28\n '}
2025-01-15 03:46:00,191: launch  INFO SR OS Variant: sr-1
2025-01-15 03:46:00,191: launch  INFO Number of NICs: 12
2025-01-15 03:46:00,191: launch  INFO Configuration mode: model-driven
2025-01-15 03:46:00,200: vrnetlab  DEBUG class: SROS_integrated, disk_image: /sros.qcow2, overlay: /sros-overlay.qcow2
2025-01-15 03:46:00,200: vrnetlab  DEBUG Creating overlay disk image
2025-01-15 03:46:00,238: launch [
sysadmin@cml-controller:~$ sudo cat /var/log/libvirt/qemu/d65d36dc-e195-4604-9502-22a91e02d913.log
[sudo] password for sysadmin:
2025-01-07 21:29:33.346+0000: starting up libvirt version: 10.0.0, package: 10.0.0-2ubuntu8.4 (Ubuntu), qemu version: 8.2.2Debian 1:8.2.2+ds-0ubuntu1.2, kernel: 6.8.0-41-generic, hostname: cml-controller
LC_ALL=C \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin \
USER=root \
HOME=/var/lib/libvirt/qemu/domain-1-d65d36dc-e195-4604-9 \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-1-d65d36dc-e195-4604-9/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-1-d65d36dc-e195-4604-9/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-1-d65d36dc-e195-4604-9/.config \
@kaelemc
kaelemc / font.ps1
Last active November 30, 2024 19:56
# Get the ID and security principal of the current user account
$myWindowsID = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal = new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
# Get the security principal for the Administrator role
$adminRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator
# Check to see if we are currently running "as Administrator"
if (!($myWindowsPrincipal.IsInRole($adminRole))) {
# We are not running "as Administrator" - so relaunch as administrator
# Create a new process object that starts PowerShell