Skip to content

Instantly share code, notes, and snippets.

@fhriley
fhriley / hddtemp.db
Created December 2, 2023 16:21
hddtemp.db
#
# Insert a regular expression for support of the model or the serie of your hard drive.
# If you don't know what to put in the second field, put the number
# that appears most often for your brand :o)
# A value of zero meens that we know that the drive doesn't have
# a temperature sensor (you can set the unit to C or F).
#
############################################################################
# The following list was found at (http://www.almico.com/forumharddisks.php)
# If your drive is in the list send me a mail.
@fhriley
fhriley / foo.py
Last active September 7, 2020 13:06
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 February 24, 2019 14:51 — forked from rudelm/autofs.md
Use autofs on Mac OS X to mount network shares automatically during access

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

@fhriley
fhriley / tmux-cheatsheet.markdown
Created March 26, 2017 15:38 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@fhriley
fhriley / custom_iterator.cpp
Created April 28, 2016 14:32 — forked from jeetsukumaran/custom_iterator.cpp
Sample C++/STL custom iterator
// 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 April 16, 2023 05:35
EdgeRouter Lite QOS for upload bandwidth
# 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