Feed on
Posts
Comments

the tricks


being a dork, i've learned a lot of geeky things through either googling or trial and error. since i'm very forgetful, i've collected these knowledge nuggets here, so that i don't have to repeat that learning process. if you can also make use of this information - fantastic! in fact, if you've got a tech question (that this body of tips suggests i know the answer to), feel free to write to LDavid AT MIT DOT EDU and i'll try to answer it. i'll even post the answer here. so without further ado, useful stuff:

Emacs

* turn on color mode in emacs on the mac
* block indent / dedent in emacs
* fixing emacs “cannot open load file” errors
* spell-check keyboard shortcut in emacs
* how to auto-indent in emacs
* add a goto-line command to emacs

Games

* get need for speed 2 se working in windows xp
* word racer program

Hardware

* install the chaintech av-710 in linux
* low frequency pure tones for testing a subwoofer
* build sturdy speaker or interconnect cable dirt cheap
* how to install a brother laser printer in unix
* make a linux-based web jukebox
* extending the range of the itrip

LaTeX

* single-space lists in latex
* how to make a compact bibliography in latex
* adjust row spacing in a latex table
* add unnumbered chapters to your table of contents in latex
* produce a resume in latex
* how to get latex working on mac os x
* place multiple images on one line in latex (or even create a matrix of images)
* insert a matlab matrix into latex automatically
* write in a monospace font (i.e. courier) in latex
* split a long, multiline formula over two lines
* how to add single-sided brackets in latex
* how to write argmax in latex
* make a table in latex
* insert a choose statement in latex
* how to insert a figure in latex
* produce LaTeX documents with regular letter margins

Mac (OS X)

* avoiding SVN and OmniGraffle errors
* avoiding SVN and OmniGraffle errors
* how to print to a CUPS server from mac os x
* upgrading to mac os x leopard leads to blue screen
* “select a destination” blank in mac os x leopard installer
* add a midpoint to a line in omnigraffle
* sqlite3 crashing on macports install
* get the distribution of focal lengths used in your photos
* rejecting multiple photos in apple aperture
* fink problems with perl Storable module
* Package description too new to be handled by this fink
* password-protect a file in mac os x
* make curved lines or arrows in omnigraffle
* dramatically speed up apple mail
* run a mac application without its icon showing in the dock
* slightly rotate an image in iphoto
* change background colors in omnigraffle 4
* give rm a new undo!
* monitor your time management
* command-line sftp client with auto-complete
* how to get latex working on mac os x
* send mail from the command-line
* setup ical for phpicalendar
* how to decompress a .tar.bz2 file
* how to draw 2D chemical structures on a mac
* use rsync to backup a directory
* how to speed up your g4 powerbook (potentially)
* how to get a color terminal
* kill stubborn processes

Matlab

* desaturate colors in matlab
* force a number of tick marks in a matlab plot
* change a matlab plot’s aspect ratio
* put vector into matlab figure legend
* use linear algebra to fit a line in matlab
* generate pure tones in matlab
* make high-quality, publication-level figures in matlab
* graphics/private/name errors when printing matlab plots
* how to make a transparent histogram in matlab
* numerically integrate f(x) in matlab
* insert a matlab matrix into latex automatically
* in matlab, find the array position of an entry closest to some arbitrary value
* find the array position of an entry closest to some arbitrary value
* set a breakpoint in matlab when dbstop not working
* identify cpu hogging matlab code
* cast a cell as a string
* write an array (or other data) to a file in matlab
* how to get matlab to talk to mysql
* copy a matlab array into excel

Mysql

* fixing “can’t connect to local mysql server through socket ‘/tmp/mysql.sock’”
* how to get matlab to talk to mysql

Perl

* use a perl one-liner to count the number of matches on the command-line
* fink problems with perl Storable module
* basic perl file input and output:
* perl remove a directory
* randomize an array in perl
* how to hash a hash in perl
* make a matrix of characters in perl
* pass a filehandle to a perl subroutine
* get size of hash in perl
* last element of an array in perl
* get the last element of an array in perl
* convert a string into an array in perl
* explicitly cast variable as an array in perl
* count matches in perl
* iterate through all the files in a directory
* append in perl
* get the length of a perl array
* generate a random number in perl
* clear the screen in perl
* read a file from the command line in perl
* run unix commands in perl
* write a switch statement in perl
* flush perl’s print buffer
* how to install the DBI module
* get the median of an array in perl
* install the numbercruncher module
* install the lwp module
* word racer program
* read an excel file in unix or perl

Photoshop

* batch processing images in photoshop
* fixing underexposed photos in photoshop

Python

* get all possible combinations of a list’s elements in python
* sort a python dictionary
* get a file or program’s full path in python
* giving a file executable permissions from python
* flush python’s print buffer
* get the absolute value in python
* suppress the output of subprocess and check_call
* read the output of a system call in python
* generate an interval-based array of numbers in python
* get timestamp in python
* measure python’s memory usage
* do fast intersections in python
* extract odd or even elements from a python list
* flush write buffer in python
* how to read and write a matrix in numpy
* read or write a python dict to/from a text file.
* hash a set in python
* call the python profiler for python benchmarking and optimization
* fixing python error: RuntimeError: maximum recursion depth exceeded in cmp
* recursively remove directories in python
* use the python debugger!!
* how to build and install scipy on “os x”
* one line factorial in python
* declare multiple variables in one line in python
* pause python
* how to do ls in python
* find the key for the minimum (or maximum) value in a python dictionary
* breaking pythons comparisons
* run a shell command in a python script
* how to invert a dictionary in python
* find the key for the minimum (or maximum) value in a python dict
* read a list backwards in python
* create a directory in python
* get the time in python
* find all the unique elements in a python list
* remove whitespace in python
* create a double dictionary in python
* get a random number in python
* sort a list in python
* get string or list length in python

Shell Scripting

* redirect stdout and stderr in a shell script
* measure running time in bash
* count matches on the command-line
* spread a one-line command over multiple lines
* perform floating point calculations in bash
* test file existence in bash
* concatenate strings in bash
* pipe filenames to rm in unix
* assign output of shell command to variable in bash
* use ’sed’ to give the shell perl-like powers
* execute a for loop on the command-line
* iterate through all the files in a directory
* get length of a string in bash shell

Unix

* remove a user in debian (unix)
* setup a static ip address in unix (specifically debian)
* use a perl one-liner to count the number of matches on the command-line
* fixing crashes while building subversion
* how to compile and install from source without root access
* get the distribution of focal lengths used in your photos
* basic compiling from source code in unix
* change your default unix or linux shell
* measure running time in bash
* apply grep recursively
* install testing packages on debian stable machine using apt-get
* fixing error: undefined macro: AC_PROG_LIBTOOL
* install aclocal in debian
* fix error: C++ compiler cannot create executables.
* install the chaintech av-710 in linux
* cups problems: 426 Upgrade Required
* use an OR in grep
* have cron stop e-mailing you
* use mpg123 with slimserver by enabling repeat
* use mpg123 to play streams that require authorization
* keep unix jobs running after logging off
* find and remove files
* ssh without a password
* give rm a new undo!
* where does apt-get sources live?
* command-line sftp client with auto-complete
* how to open zip files in debian/linux
* how to uncompress a .tar.gz file
* send mail from the command-line
* command-line tool for viewing hardware configuration
* how to decompress a .tar.bz2 file
* how to install a brother laser printer in unix
* use rsync to backup a directory
* read an excel file in unix or perl
* how to install slimserver on debian
* make a linux-based web jukebox
* how to get a color terminal
* kill stubborn processes
* how much free space
* how to add a group in unix

Webserver

* setup a static ip address in unix (specifically debian)
* how to start and stop squeezecenter from the command-line
* another way to play an mp3 stream from the command-line
* lightbox opens behind wordpress post
* how to upgrade wordpress
* how i got my lightbox effects working
* have text wrap around the digg button
* get mail working in wordpress when self-hosting
* enable aac playback for slimserver
* install alsactl
* security violation errors when restoring gallery2 backup
* phpicalendar gives foreach error after upgrading
* enable mod_headers in apache 2
* how to restart the ssh daemon
* how to integrate phpicalendar and wordpress
* enable url_rewrite in gallery2
* restart apache2
* enable mod_rewrite in apache2
* automatically constrain image sizes in wordpress
* installing the curl php extension
* installing the curl extension for php
* modify the header or body of gallery2 pages
* setup ical for phpicalendar
* where does apache2’s httpd.conf live in debian?
* how to start the slimserver daemon
* where do my web files live?
* get webdav running on an apache2 webserver
* use splay to play slimserver music
* how to install slimserver on debian
* make a linux-based web jukebox
* fixing a “sftpexception permission denied” error
More blogs about http://desk.stinkpot.org:8080/tricks.