enscript -Ec -2rG -o output.ps input.c
Pretty c 2 column, rotated, gaudy
on my machine: mount /dev/sda /mnt/zip
Wireless
/etc/rc.d/init.d/pcmcia start
On my machine eth1.
"iwconfig" to check
Sound
When Realplayer or XMMS does not start with the "Cannot open sound device: Another application may be using it" kind of error, check for zombie processes of other sound applications. plaympeg is a notorious one, it is configured as my Opera media player and sometimes will leave zombies. Worse they do not seem to die with "killall plaympeg", you must "kill -9" all the zombies manually. Always make sure using "ps auxwww | less" that there are no other sound application zombies around. Don't completely trust "kill" and "killall", check for yourself. Once such zombies are dead sound seems to always work for me :-)
Library not found
If you just compiled a new library but your program cannot find it. Add the path to the lib in /etc/ld.so.conf and run ldconfig.
If you just compiled/installed a library and another program cannot find the newer version you installed (pkg-config is still reporting the older version), define a new environment variable PKG_CONFIG_PATH and set it to the path for the pkgconfig (.pc) file for that library (look at the output of the compilation and you can figure out where the .pc file was installed). Setting a value to to PKG_CONFIG_PATH does not affect the default path pkg-config already searches, it just appends to the default path.
Sound/ALSA If you have to recompile the ALSA modules for your kernel it might advisable to use the i386 setting instead of the i686 setting even if your machine is the latest and greatest Pentium and the kernel says i686. Ensure that the kernel version number given to "rpm --rebuild" is the same as the output of "uname -a". By default the sound is muted, use alsamixer to unmute. If alsamixer does not start then you will not get any sound :-). Make sure that alsamixer works. Instructions at FreshRPMS are good.
While configuring apache make sure that in the configuration file, usually /etc/httpd/conf/httpd.conf, the "Servername" directive is set to the domain name of the server.
gcc ohsource.o sctpTelnetSource.o ../tcplib/telnet.o ../tcplib/tcplib.o ${WRAPPER}.o ${INCDIR} ${LIBDIR} ${LIB} ${FLAGS} -o ${OHSOURCE}
is not the same as
gcc ohsource.o sctpTelnetSource.o ../tcplib/telnet.o ../tcplib/tcplib.o ${INCDIR} ${LIBDIR} ${LIB} ${FLAGS} ${WRAPPER}.o -o ${OHSOURCE}
For structures, always use memcpy() to copy and always pass by reference.
- On most Red Hat systems, there's a set of config files corresponding to the various kernel options in /usr/src/linux/configs. For example, on a nearby Red Hat 7 box, we have
kernel-2.2.16-i386-BOOT.config kernel-2.2.16-i586.config kernel-2.2.16-i386-smp.config kernel-2.2.16-i686-enterprise.config kernel-2.2.16-i386.config kernel-2.2.16-i686-smp.config kernel-2.2.16-i586-smp.config kernel-2.2.16-i686.config- To determine which one is actually being used, type uname -r - on the box here, this gives 2.2.16-22enterprise, so the appropriate config file is kernel-2.2.16-i686-enterprise.config.
- Now do the following:
- cd /usr/src/linux/configs
- cp kernel-2.2.16-i686-enterprise.config ../.config
- - replace this with whichever one is appropriate
- cd /usr/src/linux
- make menuconfig
- - look over the selections if you wish, though you probably don't need to change anything. When you exit, say "yes" to saving the kernel configuration.
- make dep
- - creates all the dependencies and so on corresponding to your configuration.
- If you don't have a /usr/src/linux/configs directory, you'll have to create a configuration file as best you can. Just skip to the make menuconfig part above. For other packages, you may want to put some effort into setting up a good configuration, but for NIST Net, the default values are almost certainly good enough, so you can just exit out and save.
- You should now be able to compile and install NIST Net.
In rtc_capture.c, I changed: int irq_desc_addr; to #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,3,0) int irq_desc_addr; #endif And in knistnet.c, I changed: #if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,0) extern int irq_desc_addr; MODULE_PARM(irq_desc_addr, "i"); #endif to #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,3,0) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,1,0) extern int irq_desc_addr; MODULE_PARM(irq_desc_addr, "i"); #endif #endifThis stops insmod from complaining about the unresolved irq_desc_addr symbol.
/usr/local/man/man1, /usr/local/man/man3, usr/local/man/man4
$ cnistnet -u $ cnistnet -a 10.1.1.1 10.1.2.1 --delay 5000This installs a delay of 5000 msec between the two hosts.
if(argc == 4)
{
if(strcmp(argv[1],"send_CON_REQ") == 0)
{
cout << "got command send_CON_REQ\n";
Tcl& tcl = Tcl::instance();
sprintf(out,"%s set dst_addr_ %s", name(), argv[2]);
tcl.eval(out);
sprintf(out,"%s set dst_port_ %s", name(), argv[3]);
tcl.eval(out);
Packet *p = allocpkt();
....
....
send(p, 0);
}
}
To configure Samba on your Red Hat Linux system to use encrypted passwords, follow these steps:
Create a separate password file for Samba. To create one based on your existing /etc/passwd file, at a shell prompt, type the following command:
cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd |
Use the command chmod 600 /etc/samba/smbpasswd to change permissions on the Samba password file so that only root has read and write permissions.
The script does not copy user passwords to the new file. To set each Samba user's password, use the command smbpasswd username (replace username with each user's username). A Samba user account will not be active until a Samba password is set for it.
The next step is to enable encrypted passwords in the Samba configuration file. In the file smb.conf, uncomment the following lines:
encrypt password = yes smb passwd file = /etc/samba/smbpasswd |
To have the changes take effect, restart Samba by typing the command service smb restart at a shell prompt.
Kernel modules required: usbserial and visor.
On my machine the cradle seems to be attached to /dev/usb/ttyUSB1
To test pilot-xref use: "pilot-xfer -p /dev/usb/ttyUSB1 -b
visorbackup" and must simultaneously press the hot sync
button on
the visor. Then set a username and id for the visor using: "install-user
/dev/usb/ttyUSB0 " <put full name here include quotes>" <numeric id here >"
Now start jpilot, press sync on jpilot and the hot sync on the cradle and everything should work like a charm.
Note: If you do not use the pilot-xfer command and simultaneously press the hotsync button, pilot-xfer will complain about not finding the device/unable to bind.
Use the "authconfig" tools to setup user authentication. It is simpler then trying to struggle with NIS configuration (which sometimes despite your best intentions refuses to work :-().
iNitial setup hints here. However, it is missing a resource file and the makefile is needs adjustment. The resource file should look like:
FORM ID HelloForm AT (0 0 160 160)
BEGIN
TITLE "Hello World"
END
Note: If there is not clause between the BEGIN and END, the application
will crash. There should be some keyword there. The resource file
compilation part of the makefile should look like:
resource.binaries: $(COMPILE_RESOURCE) -H resource.h $(RESOURCES)and you should include the resource.h file in your application source.
If your filesystem is NSF mounted this probably means that your machine's clock is not synchronized to the NSF server clock. Do "ypwhich" to find the NSF server and then "ntpdate <server>" a couple of time to synchronize your clock with the NSF server.
\usepackage[dvips,all,color,line]{xy}
An example to create a thick colored line is:
\[
\xymatrix{ A\ar@*{[green]}@*{|<5pt>]}[rrr] &&& B}
\]
If you are using emacs in the Latex mode and want to enter the double-quotes character, say for the prefix character, they hitting the double-quotes character on the kerboard will not work. Hitting double quotes in the Latex mode insets two single quotes. A quick work around is the temporarily change to the fundamental mode insert the "real" double quote and then switch back to Latex mode.
Drawing arrows: If you name two object "a" and "b" then to get a arrow from "a" to "b" use \ar@{->} "a";"b" on a new line.
To get 2 pictures side-by-side in the figure environment use, in the premable (taken from Kluwer style file kapproc.cls):
\long\def\sidebyside#1#2{%
\hbox to\textwidth{\vtop{\hsize=.45\textwidth%
\parindent=0pt
\centering
#1\vskip1sp}\hfill\vtop{\hsize=.45\textwidth%
\parindent=0pt
\centering
#2
}}}
and in the main text put:
\begin{figure}
\hspace{.5cm}\scalebox{0.15}{\includegraphics{first.eps}}\hspace{2.5cm}\scalebox{0.15}{\includegraphics{second.eps}}
\sidebyside
{\caption{blurb about first}\label{fig1}}
{\caption{blurb about second}\label{fig2}}
\end{figure}
In the above snippet make sure that the two scaleboxes are on a single line.
Bold and Italic
\textbf{\textit{This text will be printed in bold and italic}}
Table of contents
To include the references/works cited/bibliography in your Table of Contents, right before the bibliography command, use the command:
\addcontentsline{toc}{section}{References}
Make eps background transparent.
To configure interface use "ifconfig le0 192.168.1.2/24 media UTP" this assumes that le0 is your interface, 192.168.1.2 is the IP address, netmask is 255.255.255.0 and that you have attached a 10BaseT (UTP/twisted pair) cable and not a 10Base5 (AUI Dense26 pin) connector. The "media UTP" part is important.
If the interface does not seem to work try testing the interfaces by first getting to the OpenBoot prompt using the above instructions and the use "test net" command at the "ok" prompt to test all interfaces. In my case it first showed "External-interface: failed" with a warning about the cable. Changing the cable [6~fixed the problem. OpenBoot is a complete(?) Forth Interpreter and has a whole bunch a tools. Sure beats the pants off PC BIOSs.
gpg -a --export <id>
gpg --edit-key gr@eclipsed.net
showpref <----- This might show trust: -/- (No trust assigned)
trust <----- Now at the prompt sent some trust level.
Encryption will now work fine.
Ensure that vsftpd is pam linked: "ldd vsftpd" show show pam.o
Create a user on the local system 'testuser' (not nis/yp user)
In vsftpd.conf:
anonymous_enable=NO pam_service_name=vsftpd
In /etc/pam.d/vsftpd:
auth required pam_listfile.so item=user sense=allow file=/etc/vsftpd.ftpusers onerr=succeedIn /etc/vsftpd.ftpusers:
testuserThe trick is that instead of denying everyone from vsftpd.ftpusers, we are allowing just the one user in vsftpd.ftpuser
Excellent resource for solaris shell command is http://www.sun.com/bigadmin/shellme/#category_23 . The parent directory is also a resource for all admin.
During booting, the keyboard must be present for the monitor to display anything. If there is no keyboard the server tries to redirect to ttya.
Installing an HP network printer in Solaris
If unable to login to CDE or Java Desktop (with permission problems)
This could be a hostname problem. Ensure that all locations have the same hostname:
link_delay is a function used by several link pipeline stages, including dpt_new_propdel and dpt_propdel.
It is defined in the external code file link_delay.ex.c. This external code file must be compiled and declared.
To compile the model in the current release of Modeler, open the "link_delay" external file
("External Source (C Code)"), and click on the "compile" button.
To compile the model in 6.0 and earlier use the following command:
prompt%> op_mko -type ex -m link_delay
You can declare this external file in the Project Editor for each
scenario you have, or alternatively Modeler users can declare this
external file in one of their process models or link models.
To declare an external object file in the Project Editor select
Declare External Files from the File menu. Scroll down until you see
the file in question (in this case link_delay) and then change its
status from "not included" to "included".
You can declare this external file in a process model or link model
which you know will be included whenever you are using this link
model. A good candidate might be a MAC process model. To declare an
external object file in the Process Model Editor select Declare
External Files from the File menu. Scroll down until you see the file
in question (in this case link_delay) and then change its status from
"not included" to "included".
You may need to refresh model directories between compiling and
declaring the external object file.
int command, val1, val2;
Objid nodeId, subnetId, targetNodeId, targetProcId;
FIN(init())
printf("Command node initializing...\n");
Ici* rcPtr = op_ici_create("ICIformatName");
command = 5; val1 = 9; val2 = 27;
op_ici_attr_set(rcPtr, "command", command);
op_ici_attr_set(rcPtr, "val1", val1);
op_ici_attr_set(rcPtr, "val2", val2);
nodeId = op_topo_parent(op_id_self());
subnetId = op_topo_parent(nodeId);
targetNodeId = op_id_from_name(subnetId, OPC_OBJTYPE_NDFIX, "node_name");
targetProcId = op_id_from_name(targetNodeId, OPC_OBJTYPE_PROC, "processor_name");
op_ici_install(rcPtr);
op_intrpt_schedule_remote(150, 0, targetProcId);
op_ici_install(OPC_NIL); /* Remove the associated ICI */
printf("Command node initialized.\n");
FOUT
To trap the interrupt at the target node (in header):
#define REMOTEARRIVAL (op_intrpt_type () == OPC_INTRPT_REMOTE)and then the code
/* Function called when this process gets and remove interrupt.
* Signals the arrival of a command */
static void remoteArrival(void)
{
Ici *incomingIci;
int command, val1, val2;
FIN(removeArrival())
printf("\nNode %s got a remote interrupt.\n");
incomingIci = op_intrpt_ici();
op_ici_attr_get(incomingIci, "command", &command);
op_ici_attr_get(incomingIci, "val1", &val1);
op_ici_attr_get(incomingIci, "val2", &val2);
printf("Incoming ici command: %d %d %d\n", command, va1, val2);
FOUT
}
Of course remoteArrival() and REMOTEARRIVAL should be set as the executive and condition to a transition on the receiving process model.
mkisofs -r -l -L -allow-multidot -allow-leading-dots -no-bak -o /usr/local/src/jmulik.iso .
/usr/local/src/dvd+rw-tools-5.21.4.10.8/growisofs -Z /dev/scd0=FC-5-i386-DVD.iso
Also samples/socket/Makefile add -lnsl -lsocket to LIBS.
ps aux | grep INET | awk '{print $2}' | xargs kill -9
cdrecord dev=/dev/hdc -scanbusgives 1,0,0 as the bus for the cdr
cdrecord dev=ATA:1,0,0 image.isoburns the image.
When following the installation instructions from the Gentoo handbook take care not to "noauto" the boot partition in /etc/fstab. The handbook recommends not automounting the boot partition for security but the problem is that I keep forgetting to mount it when I do want to install a new Kernel. Copying the new compiled kernel in to an umounted /boot will work without complain and be useless as you will keep booting into the old kernel.
For Gentoo Networking setup look at the manual "Gentoo Networking Configuration" at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4
Gentoo sound: To get sound working, make sure all the ALSA modules and your device specific drivers are enabled. IN ADDITION follow the alsa instruction at http://www.gentoo.org/doc/en/alsa-guide.xml (especially the part where you need alsamixer to unmute the speakers and such).
To install Plone:
Do not try to install the whole ZEO or unified installed shabang .. it is easy to understand and install zope and plone separately.
Basic steps are: (a) Install zope (b) Install Plone.
To install Zope follow the generic instructions here with the following exceptions:
Special instructions for Max OS X:
If you can access the zope site from the local machine but not from a remote machine there there is, of course, a firewall issue. The easiest way to open the firewall is to allow the "python" application to accept incoming connections. So add the "python.app" (in Resources) and "python" executable (in bin) the specific services and application that can accept incoming connections. Leopard gui configuration only allow for you to specify application that can accept connections and not ports.
To get Zope to startup on boot (Leopard)
#!/bin/sh
##
# Zope Web Application Server
##
. /etc/rc.common
StartService ()
{
ConsoleMessage "Starting Zope"
/Users/Zope-2.10.4_instance/bin/zopectl start
}
StopService ()
{
ConsoleMessage "Stopping Zope"
/Users/Zope-2.10.4_instance/bin/zopectl stop
}
RestartService ()
{
ConsoleMessage "Restarting Zope"
/Users/Zope-2.10.4_instance/bin/zopectl restart
}
ConsoleMessage "In the Zope script in /Library/StartupItems"
RunService "$1"
{
Description = "Zope Server Running Plone (Netlab)";
OrderPreference = "Early";
Provides = ("Zope");
Messages =
{
start = "Starting Zope";
stop = "Stopping Zope";
};
}
To change logo Follow instructions fomr Plone's site. If an older image still keeps appearing ... right click on the image on the displayed page to find he name of the image ... them in search for the image in ZMI using the search tab. Replace that image with what you want. Remember to maintain the same name.
vector<int> inner; vector< vector<int> > outer(5, inner);