Skip to content

Instantly share code, notes, and snippets.

View diarmuidcwc's full-sized avatar

Diarmuid Collins diarmuidcwc

View GitHub Profile

For C++, there are two main categories of "standards" people usually mean:

  1. Language standards (ISO C++ specifications)
  2. Coding style/formatting standards (guidelines for readability, maintainability, and safety)

1. Language Standards (ISO/IEC)

Widely supported versions of the official C++ standard:

{
"last-manual": "tinyproxy",
"last-update": 1738740516748,
"profile.lucifer": {
"value": {
"mode": "fixed_servers",
"noPrompt": false,
"remoteDNS": false,
"rules": {
"bypassList": [
@diarmuidcwc
diarmuidcwc / poll_ptp.py
Created September 28, 2023 16:32
poll_ptp
import ABI
import csv
import struct
import time
BCUS = ["192.168.28.5", "192.168.28.2"]
ptp_error_addr = 0x182E
ptp_sync_error = 500
#!/usr/bin/env python
import sys
from AxnMemCtrl import AxnMemCtrl
import typing
import datetime
import ABI
import csv
from AXN_BCU_RegMap import AXN_BCU_RegMap as BCUReg
import struct
import socket
ETH_P_ALL = 0x0003 # Receive all traffic, regardless of ethertype
sock1 = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.ntohs(ETH_P_ALL))
sock1.bind(("enp3s0", 0))
sock2 = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.ntohs(ETH_P_ALL))
sock2.bind(("enp2s0", 0))
import socket
import struct
import time
import random
class McastSocket(socket.socket):
"""
Class to make Multicast UDP handling easier.
@diarmuidcwc
diarmuidcwc / imx_benchmarking.md
Last active August 19, 2021 19:15
Benchmarking on the SabreBoard

Disk

NVMe Transcend TS128GMTE110S

1M block size exFAT This was using FUSE driver

CPU load of exfat mount is very high while running fio . This was using the fuse-exFAT driver

    fio --name=seqwrite --rw=write --direct=1 --ioengine=libaio --bs=1M --numjobs=1 --size=20G --runtime=600 --group_reporting
@diarmuidcwc
diarmuidcwc / imx_yocto.md
Last active August 16, 2021 16:30
Yocoto scratch for imx6

Setup

    mkdir /mnt/sata
    mount -t ext4 /dev/sda1 /mnt/sata
    #mkfs.ext4 /dev/nvme0n1p1
    mkdir /mnt/pcie
    mount -t ext4 /dev/nvme0n1p1 /mnt/pcie

Test

@diarmuidcwc
diarmuidcwc / polarfires_cmds.md
Last active August 13, 2021 06:20
Commands to run on the polarfire device
@diarmuidcwc
diarmuidcwc / analyse_udp.py
Created August 5, 2021 14:07
analyse udop
import struct
import logging
import socket
def analyse_udp(stop_count=None, localip='192.168.28.122', port=5550, verbose=False):
'''
Not used
'''