Saturday, November 13, 2010

tftp-hpa setup instructions on mac

Just for backup purposes as I need this tftp server only on-demand:


***** Setup Instructions *****

NOTE: By default, tftp-hpa listens to the tftp port specified in /etc/services (port 69)
on all local addresses.

To run tftpd manually for download only access, use this command:
sudo tftpd -L -s

To run tftpd manually and support tftp uploads, add "-c" to the command:
sudo tftpd -L -c -s

You may run tftpd at system boot using the startupitem if you installed tftp-hpa
using the server variant. To load the startupitem using launchctl:
sudo launchctl load -w /Library/LaunchDaemons/org.macports.tftpd.plist

NOTE: When loading tftp-hpa using launchctl, make sure to place the files you want to serve
in /opt/local/var/tftp-hpa/, because that is the location set in the StartupItem.

*******************************

If you wish to run tftpd in inetd mode, you may make an inetd compatible .plist
file and replace the one installed by MacPorts in /Library/LaunchDaemons. You
may use /System/Library/LaunchDaemons/tftp.plist as a template.

Sunday, May 23, 2010

cpufreq on debian lenny

First, check whether you already have cpu frequency scaling enabled by running cpufreq-info:

# cpufreq-info
cpufrequtils 004: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to cpufreq@lists.linux.org.uk, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which need to switch frequency at the same time: 0
hardware limits: 600 MHz - 1.70 GHz
available frequency steps: 1.70 GHz, 1.40 GHz, 1.20 GHz, 1000 MHz, 800 MHz, 600 MHz
available cpufreq governors: conservative, userspace, powersave, ondemand, performance
current policy: frequency should be within 600 MHz and 1.70 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 600 MHz (asserted by call to hardware).
cpufreq stats: 1.70 GHz:4.56%, 1.40 GHz:0.18%, 1.20 GHz:0.00%, 1000 MHz:0.21%, 800 MHz:0.18%, 600 MHz:94.86% (10)


If you do not have an output like the one above, you need to configure your cpufreq-stuff. If you do not have cpufreq-info installed, run

apt-get install cpufrequtils sysfsutils


Afterwards, you have to load your cpu scaling manager. I usually use acpi_cpufreq:


modprobe acpi_cpufreq


Afterwards, you need to decided the policy manager. See this previous entry for more information.

You can use cpufreq_ondemand for example:

modprobe cpufreq_ondemand


Finally, you have to enable the frequency scaling by enabling the governor:

echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor


To make things permanent, you can run:

echo acpi_cpufreq >> /etc/modules
echo cpufreq_ondemand >> /etc/modules
echo "devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand" >> /etc/sysfs

Saturday, March 06, 2010

XCode: 1 source file parsed, no classes found or changed

The XCode Cocoa Application Tutorial states that one has to create a controller class (ConverterController in this tutorial). This controller needs to be included into the Interface Builder (IB) by "Open->Read Class File".

If this is done, there will be an error in the MainMenu XIB/NIB-Window that says: "1 source file parsed, no classes found or changed".

I'm not sure what the problem is (maybe there was a change for Snow Leopards and XCode 3.2.1), but I found a way on how to import the Class file. You need to select "Tools->Library" and select the "Classes" tab in the Library window. You will find the ConverterController class in this list. Double-Click it and the class will appear in your MainMenu.xib

Wednesday, February 03, 2010

New Window, New Frame

Create a new window with emacs:


C-x 4 b


Close the window:


C-x 4 0


New frames can be created with C-x 5 b ...

Tuesday, February 02, 2010

Emacs: Evaluating expressions

Use M-: to evaluate a single elisp expression. You can use this for example for setting variables. For example: If you enabled the mode auto-fill (M-x auto-fill-mode), the default wrap value for your lines is set to 70.

You can then use M-: to reset this to a more sane value by entering

(setq fill-column)

into the minibuffer.

Saturday, January 30, 2010

Macports: Installing gtk-doc

Installing gtk-doc from macports failed on my system due to problems with these configure errors:


king for xsltproc... /opt/local/bin/xsltproc
checking for dblatex... no
checking for fop... no
configure: WARNING: neither dblatex nor fop found, so no pdf output from xml
checking for XML catalog (/opt/local/etc/xml/catalog)... found
checking for xmlcatalog... /opt/local/bin/xmlcatalog
checking for DocBook XML DTD V4.3 in XML catalog... not found


This seems to be a problem with the installation of the docbook packages. It was necessary to add the following nextCatalog tags into the catalog:


<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<nextCatalog catalog="/opt/local/share/xml/docbook/5.0/catalog.xml"/>
<nextCatalog catalog="/opt/local/share/xml/docbook/4.3/catalog.xml"/>
</catalog>


Afterwards, a new error occured:


king for xsltproc... /opt/local/bin/xsltproc
checking for dblatex... no
checking for fop... no
configure: WARNING: neither dblatex nor fop found, so no pdf output from xml
checking for XML catalog (/opt/local/etc/xml/catalog)... found
checking for xmlcatalog... /opt/local/bin/xmlcatalog
checking for DocBook XML DTD V4.3 in XML catalog... found
checking for DocBook XSL Stylesheets in XML catalog... not found
configure: error: could not find DocBook XSL Stylesheets in XML catalog


This could be fixed by adding another nextCatalog tag:


<nextCatalog catalog="/opt/local/share/xsl/docbook-xsl/catalog.xml"/>

Wednesday, December 23, 2009

Ignore Joins and parts on irssi


/ignore #channelname[,#channel2] JOINS PARTS


ignores JOIN- and PART messages.