Skip to content

Instantly share code, notes, and snippets.

View FlorianHeigl's full-sized avatar

Florian Heigl FlorianHeigl

View GitHub Profile
# STEP - 1 Enabling sriov on PFs
# Use following commands to find the path to enable sriov
lspci -nn | grep -i "Mellanox"
find /sys -name sriov_numvfs
# Enable SRIOV from the above path for (e.g)
# echo "2" > /sys/devices/pci0000:85/0000:85:00.0/0000:86:00.0/0000:87:00.0/0000:88:00.0/sriov_numvfs
# echo "2" > /sys/devices/pci0000:ae/0000:ae:00.0/0000:af:00.0/0000:b0:00.0/0000:b1:00.0/sriov_numvfs
# Above will configure two VFs on each IB device
### Unofficial Dump of UniFi system.cfg Properties
###
### WARNINGS:
### - This list is undocumented, unsupported, and incomplete.
### - Some options may be deprecated and ignored.
### - Some options WILL break your setup.
### - Some options work now but WILL break you in a future firmware update.
###
### USING THESE:
### See https://help.ui.com/hc/articles/205146040#2
@maelvls
maelvls / README.md
Last active July 9, 2022 13:25
Stuff about Synology OS. Moved to https://hackmd.io/8bZlqm9sQh6b0HH7Jr2YzA
@hdurdle
hdurdle / Get-UniFiClients.ps1
Created January 28, 2021 10:12
Get UniFi Client Stations from a UDM Pro
# config
$unifiServerURI = "https://192.168.1.1" # https://192.168.1.1
$unifiUsername = "unifi-login-email"
$unifiPassword = "unifi-login-password"
# # #
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }
$AllProtocols = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
@vladak
vladak / solaris-layered-debugging.md
Last active July 3, 2023 13:22
debugging a problem in Solaris from the top layer (userland) to the bottom layer (hardware)

Debugging a problem in Solaris through several OS layers

Background

This is a story about an operating system problem that occupied me at work in 2015 for couple of days. The goal is to give you an overview of debugging techniques and associated tools. I'd like to use this opportunity (writing this article for my students of the Unix programming class at the Mathematical-physical faculty of the Charles university in Prague in 2021) to provide some historical points, some background and some details about operating system work (I feel old writing this). As a bit of a spoiler, the cause of the problem turned out to be completely different than what it seemed initially and involved traversing multiple layers in the operating system. I love this kind of problems because it is fun and great learning experience. I vaguely remember a job advertisement in Netfix bunch of years back that demanded that the applicants posses intimate knowledge of the operating system internals down to (

@nahun
nahun / README.md
Last active March 25, 2024 18:18
NetBox with AzureAD OAuth

NetBox with AzureAD SSO using OAuth

This is an example setup with NetBox using AzureAD for authentication. It uses the Python Social Auth library.

Most of this was taken from this gist: https://gist.github.com/leoluk/16d91ec22d833945c7ac7ed2b3b05a27

This is written to support NetBox v2.10 to v3.0. I'll try to note differences for 2.9 or earlier.

NOTE: NetBox v3.1 added basic support for using social_auth so most of this is no longer required and can be placed in the configuration.py file.

AzureAD Setup

@chmutoff
chmutoff / jncia-junos-jn0-103.md
Last active May 11, 2023 16:19
JNCIA-Junos (JN0-103) summary

JNCIA-Junos (JN0-103) summary

v1.0

Author: Anton Chmutov Derevianko sir.antoxic@gmail.com

Product portfolio

Routers

  • M Series - first product by Juniper Networks, multiservice router (routing and MPLS services, no switches) Designed for enterprise and service providers.
  • T Series - no switching, only routing, old, performance upgrade for M. High end and core routers.
@dmrub
dmrub / unifi-ls-all-clients.py
Last active April 8, 2022 17:46
List all Unifi clients
#!/usr/bin/env python
#
# This code is based on
# https://github.com/finish06/pyunifi/blob/master/unifi-ls-clients
#
# 1. Install pyunifi
# pip install --user pyunifi
# 2. Run this script
# unifi-ls-all-clients -c UNIFI_HOST -b UNIFI_PORT -u USER -p PASSWORD -V
@ag-michael
ag-michael / falcondump.py
Created October 10, 2020 15:19
Dump Crowdstrike Falcon host data into elasticsearch
import requests
import json
import sys
import time
import datetime
from requests.auth import HTTPBasicAuth
import logging
import elasticsearch
import geoip
import traceback
@relvinhas
relvinhas / DANOS_VM_SETUP
Last active May 4, 2024 21:23
DANOS VM Setup - Passthrough and CPU pinning
virsh destroy edge-router
virsh undefine --nvram edge-router
virsh vol-delete edge-router --pool fast-storage
virt-install \
--name edge-router \
--cpu host-passthrough \
--vcpus=4,sockets=1,cores=4,threads=1 \
--ram 2048 \
--os-variant debian10 \