Skip to content

Instantly share code, notes, and snippets.

View rstemmer's full-sized avatar

Ralf Stemmer rstemmer

View GitHub Profile
# source "H.octave"
function [magnitude, phase] = H(omega, omegac, R)
# numerator
N = 1 - e.^(-2 * omega * j);
# denominator
D = 1 - 2 * R * cos(omegac) * e.^(-i * omega) + R^2 * e.^(-2 * omega * j);
F = N ./ D;
magnitude = abs(F);
@rstemmer
rstemmer / grubcfg-23_lfs.sh
Created March 20, 2013 16:19
Make GRUB2 to add your Linux From Scratch to the boot-menu. !! READ THE COMMENTS !!
#!/bin/sh
set -e
# Copyright (C) 2013 Ralf Stemmer ([email protected]) #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
@rstemmer
rstemmer / htop-1.0.2-temperature.patch
Created March 23, 2013 13:32
Adds a new Meter to htop that displays your core temperatures. You need the lm_sensors package to use this meter. After applying this patch, you have to call ./autogen.sh before configuring and compiling.
diff -urN htop-1.0.2-orig/CRT.c htop-1.0.2/CRT.c
--- htop-1.0.2-orig/CRT.c 2013-03-23 14:10:29.500604247 +0100
+++ htop-1.0.2/CRT.c 2013-03-23 14:11:01.916663508 +0100
@@ -59,6 +59,9 @@
UPTIME,
BATTERY,
TASKS_RUNNING,
+ TEMPERATURE_COOL,
+ TEMPERATURE_MEDIUM,
+ TEMPERATURE_HOT,
@rstemmer
rstemmer / moc-r2529-timelimit.patch
Created July 26, 2013 14:39
Patches mocp ( http://moc.daper.net/ ) to display huge time-values as HH:MM instead of MMM
diff -upr moc-orig/common.c moc-r2529/common.c
--- moc-orig/common.c 2013-07-26 13:08:11.740070810 +0200
+++ moc-r2529/common.c 2013-07-26 13:29:02.549007274 +0200
@@ -227,9 +227,9 @@ void sec_to_min (char *buff, const int s
{
assert (seconds >= 0);
- if (seconds < 6000) {
+ if (seconds < 60*60) {