Skip to content

Instantly share code, notes, and snippets.

View rtreffer's full-sized avatar
🔵

Rene Treffer rtreffer

🔵
View GitHub Profile
@rtreffer
rtreffer / dma_for_every_acpi_aarch64.diff
Created April 10, 2020 22:51
dma_for_every_acpi_aarch64
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index ed3d2d1a7ae9..22fc695bcf41 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -1146,12 +1146,13 @@ void iort_dma_setup(struct device *dev, u64 *dma_addr, u64 *dma_size)
else
size = 1ULL << 32;
- if (dev_is_pci(dev)) {
- ret = acpi_dma_get_range(dev, &dmaaddr, &offset, &size);
@rtreffer
rtreffer / qos-multi-network.md
Last active April 20, 2017 11:12
QoS on a 5 ethernet port system with 2 networks and management.

Ports

  • 1: Main Network in
  • 2: Main Network out
  • 3: Guest Network in
  • 4: Guest Network out
  • 5: MGMT

Interfaces

@rtreffer
rtreffer / luks-sshd.c
Created December 8, 2013 18:56
A simple libsshd server that will call luksOpen if you type in a password... Easy remote disk unlocking.
/*
* A simplistic ssh daemon that will try to unlock one or more disks,
* simply login as luks and provide your luks password.
* This daemon should be part of your initramfs, enabling "headless"
* decryption of your disks. You'll usually want to link this binary
* statically, merging all dependencies into one opaque file.
*
* You have to have a valid network setup. You'll otherwise just block your
* servers boot sequence.
*
@rtreffer
rtreffer / gist:6947685
Created October 12, 2013 09:01
fade 3 leds with bonescript
var b = require('bonescript');
// setup starting conditions
var awStep1 = (Math.random() + 1) * 0.01;
var awValue1 = awStep1;
var awDirection1 = 1;
var awPin1 = "P9_14";
var awStep2 = awStep1;
while (Math.abs(awStep2 - awStep1) < 0.002) {
@rtreffer
rtreffer / gist:6394792
Last active December 22, 2015 01:09
Network topologies

Are network topologies broken?

I hate hierarchies. Everywhere. Most networks are organized like this:

  • Assume 6 simple subnets
  • Every subnet is connected to a "core switch"

It will roughly look like this


@rtreffer
rtreffer / build.sh
Created March 25, 2011 23:29
Creating a custom eclipse
$ cat build-php.sh
#!/bin/bash
rm -rf workspace eclipse
mkdir workspace
tar -xzf eclipse-platform-3.6.2-linux-gtk-x86_64.tar.gz
cat eclipse/eclipse.ini |tr '\n' '\\'|sed 's:-vmargs.*::'|tr '\\' '\n' > eclipse.ini
cat >> eclipse.ini << HERE
-vmargs
@rtreffer
rtreffer / nodejs install
Created March 2, 2011 21:42
install / update nodejs
# cat node.sh
#!/bin/bash
[ -d 'node' ] || git clone git://github.com/joyent/node.git node || exit 1
(
cd node || exit 1
git pull
git reset --hard
git checkout -- .
git clean -- .
./configure --prefix=/usr/local/
diff --git a/pom.xml b/pom.xml
index 9f83259..9f0d32b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,6 +91,75 @@
</execution>
</executions>
</plugin>
+
+ <!-- install various artifacts -->