Developer: Difference between revisions

From bone.wiki
Jump to navigation Jump to search
Redirecting to Main Page#Developer
 
(152 intermediate revisions by 8 users not shown)
Line 1: Line 1:
==XEmacs==
#REDIRECT [[Main Page#Developer]]
 
===Pretty print===
 
:*For colour printing, select "Options", "Syntax Highlighting", "In this buffer"
:*In "Page Setup" set the margins to be 10 mm on the left and rights sides
:*In the "Printer Properties" on the "Effects" tab, use 90% of Normal size
 
==C Shell Scripts==
 
===Sample 1===
 
This file <code>aim2voi.com</code> shows the use of command line arguments in a CSH script.
 
<pre>
#!/bin/csh
#------------------------------------------------------------------------------
onintr end
if ($#argv < 1) goto usage
#------------------------------------------------------------------------------
aix $1.aim > $1.dsc
aic2voi $1.aim $1.voi
goto end
#------------------------------------------------------------------------------
usage:
#
echo ""
echo "Usage:"
echo ""
echo "aim2voi aim_filename (without aim extension)"
echo "will create a voi and dsc file from an aim"
echo ""
#
exit
#------------------------------------------------------------------------------
end:
exit
#------------------------------------------------------------------------------
</pre>
 
===Sample 2===
 
Similar to above, but <code>aim2bid.com</code> generates a temporary file called <code>stack</code> which
is used as input.
 
<pre>
#!/bin/csh
#------------------------------------------------------------------------------
onintr end
if ($#argv < 4) goto usage
#------------------------------------------------------------------------------
set i = $3
while ($i <= $4)
  set nr = $i
  if ($nr<10)  set nr = "0"$nr""
  if ($nr<100) set nr = "0"$nr""
#  if ($nr<1000) set nr = "0"$nr""
  echo "XY" >! stack
  echo "$i" >> stack
  echo "$5" >> stack
  if ($6 != "") then
    echo "0" >> stack
    aio $1 "$2"_"$nr".bid 14 < stack
    convert -size "$7" "$2"_"$nr".bid "$2"_"$nr"."$6"
    \rm -f "$2"_"$nr".bid
  else
    echo "2" >> stack
    aio $1 "$2"_"$nr".bid 14 < stack
  endif
  \rm -f stack
  @ i = $i + 1
end
goto end
#------------------------------------------------------------------------------
usage:
#
echo ""
echo "Usage:"
echo ""
echo "aim2bid aim_filename bid_prefix first_slice last_slice scal_factor [form size])"
echo "                                (values are one-based)              gif/tif/..."
echo ""
#
exit
#------------------------------------------------------------------------------
end:
exit
#------------------------------------------------------------------------------
</pre>
 
===Sample 3===
 
An example where a sequence of commands are executed resulting in an e-mail to let the user
know that their job is finished.
 
<pre>
#!/bin/csh
#  
nohup faim -s $1; /bin/csh -cbf "Mail -s 'JOB $1 FINISHED' boyd@kin < ~/adm/mailer/faimjob.txt" &
</pre>
 
==temple.ucalgary.ca==
 
===Configuration Details===
 
I include in the attachments my checklist I use for a Solaris 10
installation, adjusted to show only items particular to yours
and not my entire decision tree. I added brief explanations
for some of the items that might seem arbitrary otherwise.
 
Very similar decisions are made when installing any release
of Linux, Solaris, MS Windows or yet another operating
system - the details vary though.
 
http://docs.sun.com/ has all (too many) the details.
 
:*Operating System [[Media:01_OS.pdf| Download PDF]]
:*Configuration [[Media:02_Configuration.pdf|Download PDF]]
:*Mirror [[Media:03_Mirror.pdf|Download PDF]]
:*RAID5 [[Media:04_RAID5.pdf|Download PDF]]
:*Finishing Steps [[Media:05_Finishing_Steps.pdf|Download PDF]]
 
===Install XEmacs===
However, I would not install both Emacs and XEmacs at the same
time. Nowadays, I highly recommend installing only one of them,
with my preference given to XEmacs. Of course, only when
there are no specialized Lisp packages that require Emacs.
 
Then my installation would be like below:
<pre>
$ cd /cdrom/s10_software_companion/components/sparc/Packages
$ cat > /tmp/nointeraction
  mail=
  instance=unique
  partial=nocheck
  runlevel=nocheck
  idepend=nocheck
  rdepend=nocheck
  space=quit
  setuid=nocheck
  conflict=quit
  action=nocheck
  basedir=default
 
$ pkgadd -a /tmp/nointeraction -d . -n SFWbdb SFWgcc34l SFWxmacs
  [ Copyright and legal notices omitted for brevity. ]
  21872 blocks
 
  Installation of <SFWbdb> was successful.
  [ Copyright and legal notices omitted for brevity. ]
  69953 blocks
 
  Installation of <SFWgcc34l> was successful.
  [Copyright and legal notices omitted for brevity. ]
  264202 blocks
 
  Installation of <SFWxmacs> was successful.
 
$ emacs () { /opt/sfw/bin/xemacs $* ; }
 
$ pkgadd -a /tmp/nointeraction -d . -n SFWddd SFWgbin SFWgdb
  [ To complete installation of the other packages you require. ]
 
$ pkginfo SFWbdb SFWddd SFWgbin SFWgcc34l SFWgdb SFWxmacs
  system      SFWbdb    berkeleyDB - Berkeley Database Library
  system      SFWddd    ddd - GNU Data Display Debugger
  system      SFWgbin  binutils - GNU binary utilities
  system      SFWgcc34l gcc-3.4.2 - GNU Compiler Collection Runtime Libraries
  system      SFWgdb    gdb - GNU source level debugger
  system      SFWxmacs  XEmacs - text editor
</pre>

Latest revision as of 15:49, 16 September 2010