Skip to content

Instantly share code, notes, and snippets.

View foo.py
if self.baseboard == 'sfp':
cmd = '%s/xgige_sfp_i2c_config.py %d' % (self.exec_dir, ii)
os.system(cmd)
cmd = '%s/xgige_sfp_phy_config.py %d %s %s' % (self.exec_dir, ii, self.phy_type, self.range)
os.system(cmd)
@fhriley
fhriley / autofs.md
Created Feb 24, 2019 — forked from rudelm/autofs.md
Use autofs on Mac OS X to mount network shares automatically during access
View autofs.md

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file '/etc/auto_master' and add the last line:

#
# Automounter master map
#
+auto_master		# Use directory service
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@fhriley
fhriley / custom_iterator.cpp
Created Apr 28, 2016 — forked from jeetsukumaran/custom_iterator.cpp
Sample C++/STL custom iterator
View custom_iterator.cpp
// Sample custom iterator.
// By perfectly.insane (http://www.dreamincode.net/forums/index.php?showuser=76558)
// From: http://www.dreamincode.net/forums/index.php?showtopic=58468
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <cassert>
@fhriley
fhriley / edgerouter-qos
Last active Apr 9, 2020
EdgeRouter Lite QOS for upload bandwidth
View edgerouter-qos
# new fq-codel style
delete traffic-control
set traffic-control smart-queue wan-qos interface eth1
set traffic-control smart-queue wan-qos rate-up 34mbit
set traffic-control smart-queue wan-qos limit 600
set traffic-control smart-queue wan-qos target 2ms
sudo tc qdisc change dev eth1 parent 1:10 handle 100: fq_codel quantum 300