Skip to content

Instantly share code, notes, and snippets.

Avatar

Ralf Stemmer rstemmer

  • Oldenburg (Germany)
View GitHub Profile
@rstemmer
rstemmer / moc-r2529-timelimit.patch
Created Jul 26, 2013
Patches mocp ( http://moc.daper.net/ ) to display huge time-values as HH:MM instead of MMM
View moc-r2529-timelimit.patch
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) {
@rstemmer
rstemmer / htop-1.0.2-temperature.patch
Created Mar 23, 2013
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.
View htop-1.0.2-temperature.patch
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 / grubcfg-23_lfs.sh
Created Mar 20, 2013
Make GRUB2 to add your Linux From Scratch to the boot-menu. !! READ THE COMMENTS !!
View grubcfg-23_lfs.sh
#!/bin/sh
set -e
# Copyright (C) 2013 Ralf Stemmer (ralf.stemmer@gmx.net) #
# #
# 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. #
# #
View 3D-z-plane
# 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);