Skip to content

Instantly share code, notes, and snippets.

View pklaus's full-sized avatar

Philipp Klaus pklaus

  • Frankfurt, Germany
View GitHub Profile
@pklaus
pklaus / About_Intel-PRO1000-PF.md
Last active August 29, 2015 14:07
Intel PRO/1000 PF Server Adapter on Arch Linux 3.16

Intel PRO/1000 PF Server Adapter on Intel ARK

This is a NIC with an LC connector for 1000BASE-SX multi-mode fiber connectivity.

Take advantage of PCI Express (PCIe*) server slots and fiber-optic connectivity to enhance network performance with the Intel® PRO/1000 PF Server Adapter. The dedicated input/output (I/O) bandwidth of the PCIe in this adapter ensures priority performance, without bus sharing, for Gigabit Ethernet connectivity in fiber-optic networks.

@pklaus
pklaus / About_SR-IOV_with_Intel-Gigabit-ET-Dual-Port-Server.md
Last active August 29, 2015 14:07
SR-IOV with a Intel Gigabit ET Dual Port Server Adapter on a Dell PowerEdge T20. See http://go.klaus.pw/ET_Dual
@pklaus
pklaus / About_Intel-I350-T2.md
Last active August 29, 2015 14:08
Intel Ethernet Server Adapter I350-T2 as seen by Arch Linux 3.17

This gist is a documentation of how an Intel Ethernet Server Adapter I350-T2 appears in Arch running the Linux kernel v3.17.

@pklaus
pklaus / About_CSL-PCIe-SATA3-Controller.md
Last active August 29, 2015 14:08
CSL PCIe SATA 3 Controller 2xSATA intern/extern – Model No: 22809

This gist is a quick collection of information on the CSL PCIe SATA 3 Controller 2xSATA intern/extern – Model No: 22809, that I bought on Amazon recently.

#include <string>
#include <iostream>
#include "H5Cpp.h"
#define MAX_NAME_LENGTH 32
const std::string FileName("SimpleCompound.h5");
const std::string DatasetName("PersonalInformation");
const std::string member_age("Age");
const std::string member_sex("Sex");
const std::string member_name("Name");
@pklaus
pklaus / proc_cmdline
Created February 1, 2015 10:14
Arch Linux ARM 3.10.66-1-ARCH running on an Odroid C1
console=ttyS0,115200n8 root=/dev/mmcblk0p1 rootwait rw no_console_suspend vdaccfg=0xa000 logo=osd1,loaded,0x7900000,720p,full dmfc=3 cvbsmode=576cvbs hdmimode=1080p m_bpp=32 vout=hdmi disableuhs
#!/usr/bin/env python
"""
Read from a DCF77 USB HID RTC using PyUSB/libusb.
You need root access to get this to work.
"""
import sys
from time import sleep
from datetime import datetime
@pklaus
pklaus / gerber_query.py
Last active August 29, 2015 14:15
Script to query Gerber file outer dimensions
#!/usr/bin/env python
# From <https://www.wayneandlayne.com/blog/2013/04/02/script-to-query-gerber-file-outer-dimensions/>
# Gerber query script
# Usage: ./gerber_query.py board_edges.gbr
# Written by Matthew Beckler for Wayne and Layne, LLC
# Based on a script from @laen
# Released into the Public Domain. Have fun
def main():
@pklaus
pklaus / tcpthreadedserver.py
Last active August 30, 2015 11:03
TCPThreadedServer Python3.x enabled (ported from the Python2.x version from http://stackoverflow.com/a/11073608/183995)
from socketserver import TCPServer, StreamRequestHandler, ThreadingMixIn
import threading
class TCPThreadedServer(TCPServer, ThreadingMixIn):
class RequestHandler(StreamRequestHandler):
def handle(self):
msg = self.rfile.readline().decode('utf-8').strip()
reply = self.server.process(msg)
if reply is not None:
self.wfile.write((reply + '\n').encode('utf-8'))
@pklaus
pklaus / client3.java
Created January 8, 2010 15:06
Small Java speed test for the ethersex platform.
// original script by Oliver Reimann
// <http://list.zerties.org/pipermail/ethersex-devel/attachments/20090223/36379536/client3.java>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;