| Useful Unix Tools | 
much of the Unix and C debugging content is also in the Dive into Systems textbook (Chapt. 3: gdb and valgrind, Appendix 2: Using Unix)
	 
	 I have example latex documents for producing
slides and papers that show examples of importing image files, using 
bibtex and using latex's math mode.  You can grab a copy and use it
as a starting point for your document. Look in my public directory 
(start with the README file):
 Here are some other latex and bibtex links:
 
	 
	 
 
	 
 
	 
	 
		 tmux cheatsheet
			  Here is a simple script for setting up a tmux session with three
			panes:
 
			When using screen and tmux, be careful about not leaving a lot of old
			screen and tmux sessions of yours running on lab machines.  If you ssh
			into a particular machine each time you run tmux or screen (ssh
			you@machinename.cs.swarthmore.edu), that is one way to avoid
		leaving one running on a machine that you forget about.  You can get cs
		machine names from the 
		cs machines page.
		 
 
 
 
 
 
 
vim (or vi) and emacs are the two editors you can use on our system.  If
you don't know either emacs or vim, I recommend vim over emacs.
 
	
	
tools for creating documents:
/home/newhall/public/latex_examples/
In the paper subdirectory is an starting point for a CS 
research paper or thesis that uses bibtex.  It describes how to organize
CS technical papers and it shows many examples of latex formating:
  cp -r /home/newhall/public/latex_examples/paper/* .
  cd paper
  cat README
  make
some latex info written for Swarthmore students
a latex tutorial
 Wikibooks Latex pages
 www.latex-project.org
 www.bibtex.org
 ShareLaTeX's latex documentation
libreoffice               # create a new file
libreoffice file.doc      # edit an existing one
tools for drawing figures:
tools for creating graphs:
 I have examples in: /home/newhall/public/gnuplot_examples
 a gnuplot tutorial: A gnuplot tutorial
 some demo scripts for creating all different types of plots:
gnuplot demo scripts
 I have a simple example here: /home/newhall/public/pylab
tools for capturing windows and editing images:
 
xwd > outfile.xwd	# then click on window to capture in outfile.xwd
You can convert xwd format to other formats using gimp or the unix
command line utilites.  For example, here I'm converting it to jpeg by
first converting to pnm and then to pnm:
xwdtopnm outfile.xwd > outfile.pnm 
pnmtojpeg outfile.pnm > outfile.jpeg
converting between image formats:
# pnmtopng requires explicit output re-direction to a file
pnmtopng fig1.ppm  > fig1.png
# ps2pdf does not (it will create fig2.pdf):
ps2pdf fig2.ps 
 
	
and my git guide written for students using git for CS labs/projects
	
the CS department CS Dept git guide for students using git and the Swarthmore GitHub Enterprise for CS labs/projects
	
	
  cp -r ~newhall/public/bashscript_examples .
	
	See the README file for a description of what each demostrates.
	 
		
				
			
    
		
tmux shortcuts
			
#!/bin/bash
# This is an example shell script for creating 
# and attaching to a tmux session
# you can call with a command line argument for the 
# name of session or not:
#  ./mytux cs44      # create tux session named cs44
#  ./mytux           # create tux session named mySession 
#
if [ $# -gt 0 ] ; then  
  Name=$1
else
  Name="mySession"
fi
tmux new-session -s $Name -d
tmux split-window -h
tmux resize-pane -L -x 80
tmux resize-pane -R -x 40
tmux split-window -v
tmux -2 attach-session -d -t $Name
			
bash shell programming links.
$ crontab -e
  # sytax:
  # min hour day month day-of-week  command 
  # run my killmytests.sh script at 8pm (20:00), on January (1) 31:
  0 20 31 1 * /home/me/cs31/killmytests.sh
  # run my run.sh script at 4:15 am on February 13 
  15 4 13 2 * /home/me/cs31/run.sh 
see the man page for cron and crontab for more information
	
% time ./myprog
real    0m10.083s
user    0m0.000s
sys     0m0.004s
# here is time for a cpu-bound program.  you can see almost all of its 
# 7.931 seconds of execution time were due to user-level cpu time
%time ./a.out
real    0m7.931s
user    0m7.928s
sys     0m0.000s
% gcc -g -p -o myprog foo.c
when you run your program, a file named gmon.out is created that contains
profiling information of the run of your program.  You can view this 
file by running gprof (see the man page for gprof for more information):
% ./myprog
% gprof myprog gmon.out 
| Programming Language-Specific Help | 
C Tutorials and Language References:
| OS/Arch Links | 
cat /proc/meminfo             # list total and free memory (RAM) in system and how it is allocated/used
cat /proc/iomem               # lists expanses of RAM addresses and what is mapped in there
                              # (note extents for mem mapped drivers, and Kernel memory space)
	
| Linux | 
(an older reference for using QEMU for OS course projects)
| Network & Parallel Programming | 
	Sockets, http: 
 MPI and PVM: Using XSEDE
 pthreads:
 GPU computing:
 OpenMP:
 Grid, Cloud and similar: Partitioned Global Address Space Programming (PGAS) Parallel Algorithms: