Skip to content

Instantly share code, notes, and snippets.

View anonhostpi's full-sized avatar
📝
Studying...

Blue Falcon anonhostpi

📝
Studying...
View GitHub Profile

Background

I've got this idea for an ingress controller VM using OpenWRT. I'll eventually get this implemented on my proxmox machine, but for now I'm developing my implementation in virtualbox.

Using this guide to get the generic x86-64 UEFI image to run on vb: https://openwrt.org/docs/guide-user/virtualization/virtualbox-vm

Challenges

Initial Networking

The first challenge is to design a working networking. One part of this goal will be to get LuCi to not conflict with Nginx. I could have LuCi listen to localhost (127.0.0.1), but for development purposes, I will provide it with an additional host-only testing adapter, so that LuCi can be reached directly for testing.

0 FILE mE0A7EE34_202444_114200.dat
0 Plate, Modified 2 x 1 with Towball Socket 2
0 Name: mE0A7EE34_202444_114200.dat
0 Author:
0 BFC CERTIFY CCW
3 16 -16.000 0.000 -6.000 16.000 0.000 -6.000 20.000 0.000 -10.000
3 16 20.000 0.000 -10.000 -20.000 0.000 -10.000 -16.000 0.000 -6.000
3 16 16.000 0.000 -6.000 16.000 0.000 6.000 20.000 0.000 10.000
3 16 20.000 0.000 10.000 20.000 0.000 -10.000 16.000 0.000 -6.000
3 16 16.000 0.000 6.000 -16.000 0.000 6.000 -20.000 0.000 10.000
@anonhostpi
anonhostpi / configfs.md
Last active February 20, 2024 15:14
ConfigFS, FunctionFS, GadgetFS, the Gadget API, Dual-Role, and OTG libraries - A comprehensive list of it all.

Ok, so I am writing a comprehensive list for all libraries, tools, modules, and scripts for any linux distro or kernel that I can find anywhere, so I can learn more about how to make use of it.

Currently this list contains Source Code with the following keywords:

  • FunctionFS, ConfigFS, GadgetFS, gadget mode, and USB Gadget API
  • USB 3.0 Dual-Role Device (DRD) and USB 2.0 On-The-Go (OTG)
  • libcomposite (the kernel library that ConfigFS uses to create USB gadgets)
  • DesignWare Core SuperSpeed 3.0 (DWC3)
  • appears to be the main proprieter of USB 3.0 Gadget hardware
@anonhostpi
anonhostpi / tempath.psm1
Created January 18, 2024 10:49
Temporary path generation and garbage collection
# Scope table for the module
$scope = @{}
$scope.mname = "TempPathModule"
$scope.parent_path = @(
[System.IO.Path]::GetTempPath()
$scope.mname
) | Join-Path
$scope.mutexes = @{}
@anonhostpi
anonhostpi / shauntlet.ps1
Last active January 17, 2024 12:04
The PowerShanos Thanos Shauntlet
using namespace Python.Runtime
# Import the C# libraries:
Import-Package pythonnet
Import-Package Microsoft.ClearScript
Import-Package NLua
Import-Package IronRuby.Libraries
Import-Package R.NET
# Setup Python:
@anonhostpi
anonhostpi / ruby.ps1
Created January 17, 2024 07:23
Run Ruby Code in PowerShell
# Import-Module Import-Package
Import-Package IronRuby.Libraries
$ruby = [IronRuby.Ruby]::CreateRuntime()
$engine = $ruby.GetEngine("rb")
$engine.Execute("puts 'Hello, World!'")
@anonhostpi
anonhostpi / julia.ps1
Last active January 17, 2024 07:02
Execute Julia code in PowerShell
using namespace Python.Runtime
# winget install julia -s msstore # Julia engine
# pip install julia # PyJulia
# Import-Module Import-Package
Import-Package pythonnet
# Initialize the engine and lock CPython
[PythonEngine]::BeginAllowThreads()
[PythonEngine]::Initialize()
@anonhostpi
anonhostpi / r.ps1
Created January 14, 2024 12:46
Run R code in PowerShell
Import-Package R.NET
$r = [RDotNet.REngine]::GetInstance()
$r.Evaluate('cat("Hello World")')
@anonhostpi
anonhostpi / java.ps1
Created January 14, 2024 05:46
Run Java in PowerShell
using namespace Python.Runtime
# Install-Module Import-Package | Import-Module
Import-Package pythonnet
& {
$dll = Try {
where.exe python | ForEach-Object {
$root = $_ | Split-Path -Parent
$name = $root | Split-Path -Leaf
@anonhostpi
anonhostpi / Edit-Profile.ps1
Last active January 8, 2024 08:38
Simple edit profile in code
https://gist.github.com/anonhostpi/c9117bc3e344898690624dbb804faa19
function Edit-Profile {
param(
[Parameter(Position=0)]
[ValidateSet("CurrentUserCurrentHost", "CurrentUserAllHosts", "AllUsersCurrentHost", "AllUsersAllHosts")]
[string]$Type = "CurrentUserCurrentHost"
)
code ($Profile.$Type | Split-Path -Parent) $Profile.$Type