Skip to content

Instantly share code, notes, and snippets.

@myd7349
myd7349 / linux_reading_list.md
Created January 17, 2025 11:41 — forked from eenblam/linux_reading_list.md
Linux Networking Reading List

Linux Networking Reading List

Currently in no particular order. Most of these are kind of ancient.

Where's all the modern documentation? So much of what I've turned up searching is other folks complaining about having few options beyond reading source code.

The OREILLY books, while dated, seem to be some of the best available. Note that these can be read with a 7-day trial. Do this! At least get through the introduction section and first chapter of each to see if it's what you're after.

https://www.netfilter.org/

@myd7349
myd7349 / sugh.sh
Created January 17, 2025 11:32 — forked from erdincay/sugh.sh
su GitHub (downloading all repositories from a given user)
#!/bin/bash
if [ -z "$1" ]; then
echo "waiting for the following arguments: username + max-page-number"
exit 1
else
name=$1
fi
if [ -z "$2" ]; then
@myd7349
myd7349 / plot_csd_erp.ipynb
Created November 7, 2024 09:31 — forked from sherdim/plot_csd_erp.ipynb
Current Source Density with mne-python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@myd7349
myd7349 / eigen_matlab.cpp
Created October 21, 2024 02:53 — forked from phg1024/eigen_matlab.cpp
Eigen-MATLAB reference
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
@myd7349
myd7349 / Eigen Cheat sheet
Created October 16, 2024 14:42 — forked from gocarlos/Eigen Cheat sheet
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
@myd7349
myd7349 / svn-to-git.md
Created October 10, 2024 12:27 — forked from barrysteyn/svn-to-git.md
Migrate From SVN To GIT
@myd7349
myd7349 / dotnetlayout.md
Created August 27, 2024 12:54 — forked from davidfowl/dotnetlayout.md
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@myd7349
myd7349 / REAMDE.md
Created August 8, 2024 07:39 — forked from msymt/REAMDE.md
C# to C IPC with memory mapped file

MappedMemory: C# to C

  1. From console create file: dd if=/dev/zero of=/tmp/sharedfile bs=12288 count=1
  2. The C# program
  3. The C program

usage

mcs Sender.cs
# install tools
sudo apt-get install pkg-config cmake
# install dependencies
sudo apt-get install \
libssh2-1-dev \
libssl-dev \
zlib1g-dev \
libncurses5-dev \
libncursesw5-dev \
@myd7349
myd7349 / CastingHelper.cs
Created July 23, 2024 08:37 — forked from 13xforever/CastingHelper.cs
Casting array of bytes to struct and vice versa in C#
public static class CastingHelper
{
public static T CastToStruct<T>(this byte[] data) where T : struct
{
var pData = GCHandle.Alloc(data, GCHandleType.Pinned);
var result = (T)Marshal.PtrToStructure(pData.AddrOfPinnedObject(), typeof(T));
pData.Free();
return result;
}