07.08.04 19:06 linux: gtk-config is in libgtk1.2-dev 07.08.04 19:07 macosx: hold down apple-s during start up to boot into single user mode as root 07.08.04 19:07 macosx: boot from mac os x install cd (hold down c during startup) and use reset password utility to change a password w/o admin access 07.08.04 19:09 sms: to send and sms (text message) via aim, just append a plus sign to phone number, i.e. +19175551234 sends message to mobile phone at 917.555.1234 07.08.04 19:12 sms: sms email servers: verizon vtext.com, att mobile.att.net, tmobile tmomail.net, sprint messaging.sprintpcs.com 07.08.04 19:15 google: google features we should all use http://www.google.com/help/features.html 07.08.04 19:19 matlab: get the matlab mode for emacs (google matlab.el) and abandon matlab's editor 07.11.04 20:15 latex: $\AA$ gives the symbol for an angstrom 07.12.04 16:41 perl: install cpan modules via: perl -MCPAN -e 'install "Module::Name"' 08.03.04 11:06 macosx: make sure numlock is off if your keyboard isn't working. 08.04.04 11:06 emacs: to format whole file, C-x h then Esc C-\ 08.29.04 12:17 linux: if an install display is all funky, load the kernel w/ option vga=771 or similar 08.29.04 13:52 linux: my realtek 8100b/8139d didn't work until i passed kernel parameters: nohotplug noapic acpi=off : to the kernel on boot 08.30.04 14:26 bash: \!:1 % 1st command line arg 08.31.04 13:21 perl: executing perl -MModule::Name will tell you if you have a perl module installed 09.09.04 17:42 macosx: to mount an image from the command line, type: sudo hdutil attach path/to/image/file.iso path/to/image/file.dmg path/to/image/file.cdr 09.25.04 13:42 macosx: scselect and scutil are useful for selecting network locations in os x 09.29.04 08:10 matlab: use index = find( diff( sign( diff([0; x(:); 0]) ) ) < 0 ); to find local maxima of a vector 09.29.04 08:10 10.02.04 01:02 ipod: if you are totally screwed with your ipod, hold down prev, next and select to get into disk check mode 10.13.04 23:32 c: %lf reads a double 10.21.04 12:15 c: declare static variable: has scope only in function, but persists in memory even after function exits and can be accessed again 10.25.04 19:19 c: getopt for flexible argument handling 10.27.04 17:31 matlab: squeeze will allow you to do something like imagesc(squeeze(x(:,1,:))) 10.29.04 00:08 emacs: to beautify entire file, set mark, go to end of block, hit esc ctrl-\ to beautify 11.13.04 10:37 matlab: diary will save command window input and output 11.13.04 10:38 unix: file tells you what type of file you are dealing with 11.13.04 10:38 unix: wc counts words lines, etc ... 11.17.04 13:06 matlab: the backslash operator in matlab is nice for solving Ax = b via x = b A 11.20.04 17:11 perl: when in doubt, perldoc perlvar 11.28.04 15:08 latex: use circ for degree symbol 03.07.05 14:30 shell: create tarball and send directly over network connection with: tar cf - /foo | ssh hostname 'cat > target_archive.tar' 03.14.05 00:25 applescript: to compare dates, just compare friggin dates. 04.26.05 13:46 x11: make sure DISPLAY isn't set if you want ssh to figure out X11 forwarding ... 04.26.05 14:21 shell: killall is a nice way to kill things by name 04.28.05 20:47 shell: du -h directory will give the size of the files contained in directory 04.29.05 13:07 matlab: use java.util.Hashtable for hashes in matlab 04.29.05 13:07 matlab: use methodsview java.util.Hashtable (or any other object) to view description of methods 04.29.05 14:43 matlab: to get a single quote inside a string in matlab, use two single quotes in a row 05.02.05 11:29 matlab: help punct and help colon will tell you useful things 05.05.05 01:35 macosx: cmd-cntrl-d over a word gives quick dictionary 05.10.05 16:48 linux: use /etc/aliases to change who gets mail for root, then restart mta, run newaliases 05.10.05 17:05 linux: motd needs newline at end of last line to display 05.12.05 21:28 linux: basename and dirname are good commands to know 05.12.05 21:28 linux: to rename whole directory ... for f in *; do mv "$f" "${f// /_}"; done 05.13.05 00:00 cvs: to add a binary file, use -kb 06.02.05 10:28 matlab: create /usr/local/matlab/pathdef.m to permanently add stuff to your path 06.11.05 00:23 bash: seq -f "%03g" 1 50 for zeropadding inside for loop 06.30.05 20:54 linux: use run-parts to run all files in a directory 07.16.05 15:22 applescript: to dereference posix path of string to alias, use posix file as alias 07.19.05 21:13 applescript: return and \n are not the same thing 08.17.05 13:50 php: %04d will write a zero-padded 4 digit integer ... 08.17.05 18:08 mysql: left join happens first, then comment right join table 08.25.05 11:05 html: pre tag says "dont interpret" 08.26.05 17:42 macosx: system_profiler SPAirPortDataType | awk -F": " '/Current Wireless Network/{print }' 08.27.05 01:46 linux: if local loopback device is not configured and up, x11 forwarding will not work 09.07.05 14:52 shell: to list files in a tarball, tar -ztf filename.tar.gz 09.07.05 22:49 bash: $RANDOM generates a random number 09.12.05 14:35 emacs: enlarge-window will enlarge a window 09.13.05 15:32 shell: to get double sided printing lpr -o sides=two-sided-long-edge 09.19.05 17:34 unix: time shows how long command takes to execute 09.21.05 14:12 safari: if plugins ain't working, then make sure they are enabled in preferences,security 09.22.05 11:52 macosx: sysprefs, appearance has control of number of recent items displayed 09.22.05 12:52 excel: use windows text to avoid crappy formatting 09.26.05 16:13 matlab: isosurface(h) to visualize a 3-d surface 09.26.05 16:15 macosx: hold down mouse button to eject stuck cd on boot 09.26.05 18:40 bash: &> to redirect stderr and stdout 09.28.05 00:31 rsync: if connectioned unexpectedly closed, maybe rsync is not installed on remote machine ... 09.28.05 14:07 latex: to get a prefixed superscript on something, use {}; ie {}_nC_k 10.06.05 12:02 excel: use ctl-~ to see formulas in a spreadsheet 10.15.05 17:16 latex: verbatiminput from moreverb package gives way to input a file and have it show up verbatim 10.15.05 17:40 latex: fancyvrb is a "better" verbatim package ... supposedly. 10.17.05 01:30 latex: \jobname gives filename w/o extension 10.21.05 01:48 matlab: you can use avifile and addframe to make matlab movies without displaying frames 10.24.05 13:12 shell: groff -l -mandoc `man -w ` 10.24.05 13:46 shell: x-man-page:// will get you a url to a manpage 10.24.05 18:11 sed: sed -e $'s/$/\r/' < myunix.txt > mydos.txt to convert dos to unix linebreaks 10.25.05 20:36 macosx: apparently ioreg does some cool stuff 10.26.05 15:27 linux: /proc/filesystems has list of all supported filesystems 10.28.05 19:56 bash: source kind of includes a script ... i.e. when script exists, exports will be effective in parent shell, etc. 10.28.05 22:15 bash: to read in from a pipe, just think of stdin and use something like read myvar, or a while loop if you expect multiple lines 11.01.05 11:15 matlab: mvnpdf to eval many x values under multivariate distn 11.01.05 11:17 matlab: samples from multivariate distns 11.02.05 01:45 linux: pwgen for random password generation 11.12.05 11:48 shell: use jhead -autorot to change from exif style rotation to lossless rotated image 11.14.05 08:40 macosx: apple-shift-y gives your stickies 11.14.05 15:10 awk: to ignore case, use IGNORECASE=1 11.22.05 11:15 ipod: zero out disk w/ disk utility in worst case 11.24.05 11:30 macosx: mail.app has messages -> remove attachments 11.29.05 12:27 shell: .* will not match a newline in regex 11.30.05 14:02 bash: man -k searches for a keyword 12.08.05 11:31 windows: check properties on a cd drive to enable cd burning 12.15.05 21:56 macosx: hold down shift when opening mail.app to not select a mailbox 12.29.05 00:25 shell: to get mtime of a file: stat -f %m 12.31.05 19:34 shell: man -t command | open -f -a preview 12.31.05 19:36 macosx: ~/Library/Preferences/.GlobalPreferences.plist 01.03.06 12:36 quicktime: to rotate move, go to properties, video track, visual settings 01.04.06 02:46 bash: substitute for if then: [ condition ] && command 01.04.06 02:47 macosx: to get screen capture from terminal, use screencapture 01.04.06 13:12 macosx: to get startup manager, hold down option key after startup chime 01.06.06 11:18 matlab: use drawnow to update plot 01.10.06 12:37 shell: to list only directories, ls -d */ 01.25.06 14:37 shell: using screen, ctl-a-d detaches 01.25.06 14:37 shell: screen -d -m nohup to run after exit, fo sho 01.26.06 10:47 macosx: in terminal, use cmd-option-return to perform text selection 01.27.06 10:08 macosx: watch /Library/Preferences/SystemConfiguration for network changes 01.31.06 10:57 network: find out a lot about network stuff by typing ipconfig getpacket 02.08.06 10:48 windows: boot from cd, choose r for recovery console, fixboot, fixmbr, chkdsk c:, help for more 02.08.06 13:49 razr: clr * locks keypad on phone 02.09.06 11:48 shell: url for a man page with section is: x-man-page://
/ 02.09.06 11:49 applescript: to turn on gui scripting from command line: sudo touch /private/var/db/.AccessibilityAPIEnabled 02.10.06 11:57 google: if you are feeling luck, add &btnI=I%27m+Feeling+Lucky to the end of your query 02.13.06 15:56 cvs: cvs mode in emacs uses ctrl-x v v and ctrl-c c 02.15.06 11:21 matlab: mfilename returns the name of the current mfile 02.15.06 11:58 matlab: edit preferences, mat file, save to version 6 (v6) to get backwards-compatible files 02.15.06 12:23 matlab: as per http://tinyurl.com/bxulh, can write tiff stacks out using the writemode=append open w/ imwrite 02.15.06 12:53 awk: replace fields with nothing ... {$1=""; print $0;} 02.15.06 13:01 bash: to redirect stderror to a file command 2> filename 02.20.06 20:57 macosx: appl-shift-i to mail url of page in safari 02.21.06 12:52 matlab: to get single quotes in a string, use two single quotes in a row 02.22.06 11:09 shell: to find files modified in the last day find . -type f -mtime -1 02.24.06 00:29 latex: to get colors, usepackage color and \textcolor{red} for example 02.24.06 00:30 latex: to get strikeouts, usepackage ulem and \sout{} 03.02.06 14:37 macosx: apache log files are in /var/log/httpd 03.02.06 15:40 shell: curl can resume transfers: curl -C - 03.04.06 08:26 latex: to get blank spaces, use \hspace 03.07.06 11:36 macosx: cmd-option-o-f to boot into open firmware 03.08.06 10:07 idvd: turn off watermark in preferences 03.08.06 11:23 macosx: to start in safe mode, hold down shift 03.08.06 11:43 matlab: use %c format string in matlab to read w newlines 03.11.06 07:57 cu: clio-db.cc.columbia.edu is text-based interface to clio 03.14.06 12:48 macosx: textutil converts btwn document formats quite nicely 03.14.06 14:11 irc: to search for a channel, try /msg chanserv list 03.16.06 13:34 bash: to get single quotes in a string, use a single quote, followed by a backslashed, followed by two single quotes: 'a single quote: '\'' .' 03.16.06 13:35 sed: to reverse the lines of a file (last line first), use: sed '1!G;h;$!d' 03.16.06 13:37 shell: another way to reverse lines of file, seemingly faster than older method: cat -n file.txt | sort -r | sed -e 's/[[:space:]]\{1,\}[[:digit:]]\{1,\}[[:space:]]//' 03.16.06 13:48 shell: to find empty files in pwd and below, find . -size 0 or find . -empty 03.17.06 13:26 bash: to remove pattern at end of a variable, use ${varname%pattern} 03.18.06 19:03 macosx: to hide hard drives on the desktop, just use finder preferences 03.22.06 14:11 shell: lsof lists open files 03.23.06 09:33 latex: to put a caption above a figure, just tex it so the caption is literally place above the includegraphic 03.23.06 11:23 macosx: systemkeychain ... sudo mv /Library/Keychains/System.keychain /Library/Keychains/System.keychain.bak; sudo /usr/sbin/systemkeychain -C; reboot 03.23.06 11:59 macosx: to remove finder, mv Finder.app to something else in /System/Library/CoreServices/Finder.app/Contents/MacOs/ 03.23.06 12:17 shell: use -ls switch on find to get verbose listing instead of print 03.23.06 14:14 network: ping -o -t 1 to ping w a 1 second timeout and exit on success 03.23.06 17:57 windows: if usb drives are not automounting, use util diskpart. at prompt, automount enable and exit 03.25.06 18:52 windows: sfc command scans and trys to repair windows system files 03.25.06 22:25 bash: else if is elif 03.26.06 18:56 windows: to minimize current window, alt-space-n 03.27.06 10:45 macosx: to use spotlight from finder, use the mdfind command 03.28.06 20:09 bash: this will show you the extension of filename in $x: "${x##*.}" 03.28.06 22:04 linux: append a 1 to grub or lilo boot, or init=/bin/sh to get into single user mode. mount read/write 03.29.06 13:48 macosx: to disable crash reporter, either use CrashReporterPrefs from developer tools or: defaults write com.apple.CrashReporter DialogType server 03.30.06 21:29 windows: to kill a process from the command line, use taskkill 04.03.06 16:12 applescript: install scripting additions to /System/Library/ScriptingAdditions and their dictionaries are ready to use 04.05.06 12:09 firefox: add this to user.js to remove page rendering delay: user_pref("nglayout.initialpaint.delay", 0); 04.05.06 13:41 cvs: to start a cvs repository, use cvs init 04.05.06 13:42 cvs: to import a project into a repository, use cvs import 04.06.06 17:49 awk: to print even lines, NR %2. odd lines, 'NR % 2 == 1'. 04.17.06 17:28 latex: pdfcrop can crop pdfs nicely 04.17.06 22:46 macosx: to get a plus-minus sign, use shift-option-= 04.23.06 14:40 linux: i think this just allows all tcp traffic on iptables: iptables -A INPUT -p tcp -j ACCEPT 04.23.06 20:41 latex: to tex eqns to images, use tex2im 04.27.06 15:29 emacs: escape backtick will give you the emacs menu, it seems 04.27.06 22:30 macosx: sudo nvram boot-command=target-mode to boot into target disk mode on all subsequent boots; article 42642 tells how to disable 04.28.06 14:02 windows: change key HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesUsbStor Start from 3 to 4 to disable usb storage devices 05.03.06 13:04 linux: iptables -I INPUT -i eth0 -j ACCEPT accepts all traffic on eth0 05.09.06 09:42 matlab: clc clears command window 05.23.06 13:33 macosx: cmd-shift-4 and then space bar does a window capture 05.30.06 15:40 network: ping -c2 broad.cast.ip.address and then arp -a or nmap -sP sub.net.mask.ip/24 05.30.06 16:29 emacs: to change modes, M-x mode-name 06.06.06 22:44 mysql: use mysql_real_escape_string to make input to db safe 06.08.06 11:32 cu: try kinit to get a kerberos ticket session, whatever that means 06.27.06 14:29 macosx: to disable guest login on afp, use sudo defaults write /Library/Preferences/com.apple.AppleFileServer guestAccess No 07.13.06 11:39 sms: ATT: mobile.att.net, Verizon: vtext.com, Sprint: messaging.sprintpcs.com, T-Mobile: tmomail.net -OR- @voicestream.net, Cingular: mobile.mycingular.com, Nextel: messaging.nextel.com 07.13.06 15:43 macosx: to test out widgets, use command-option and turn install into run 07.18.06 11:36 google: use google.com/xhtml as an easy proxy 07.19.06 14:19 windows: copy wpa.dbl and wpa.bak over to machine to avoid re-registration 07.19.06 14:21 google: type "time in ..." to get the current local time 07.26.06 10:02 windows: tr \n \r to fix windows returns 07.31.06 21:41 linux: cat /etc/debian_version to see what version of debian you are running 08.07.06 16:31 bash: any piped process runs as a child... so echo foo | xargs cd will do nothing 08.11.06 11:53 iphoto: on import screen, hit return twice and see contents of card 08.14.06 13:32 ssh: sudo ssh -L 80:server:80 -l uname -N server to tunnel via ssh 08.20.06 22:53 lifehack: point of view, listeners, benefits, action steps 08.22.06 12:39 matlab: for optional arguments that you want to set defaults for, you can try if exist(quoted_varname) ~= 1 ... end 08.22.06 12:41 ssh: scp -o ConnectTimeout=num_sec to have automatic timeout on secure copy 08.22.06 13:17 matlab: to do labels instead of numbers on, for instance, the x axis of a plot, try set(gca,'XTickLabel',{'One';'Two'}) 08.23.06 00:32 macosx: to force mounting of the iso9660 partition of a hybrid cd, use mount -t cd9660 -o nodev,nosuid,read_only /dev/disk1s1 path_to_mount, assuming disk1 is your cd drive 08.24.06 15:31 google: to search for index pages, use intitle:index.of 08.28.06 10:38 ssh: for ssh tunneling when you do not have admin rights on the client machine, forward to non-privileged ports, greater than 1024 09.01.06 14:40 macosx: ipconfig getpacket en0 for lots of networking info 09.02.06 12:09 linux: to disable hyperthreading, pass noht to the kernel at boot 09.02.06 18:12 quicktime: hit shift-uparrow to increase volume past the max of the slider bar 09.05.06 22:35 matlab: if using netlab w/ matlab 7 or greater, download foptions.m from http://www.ncrg.aston.ac.uk/netlab/downloads/foptions.m 09.07.06 00:41 treo: #*#33284 will get you into debug mode. note that 33284 is just debug spelled out 09.11.06 22:27 lifehack: to make international calls with vonage, start with 011 09.14.06 13:51 linux: to mount an iso, mount -t iso9660 -o ro,loop=/dev/loop0 cd_image /dir 09.15.06 17:35 quicktime: in advanced preferences, enable flash playback 09.15.06 17:37 itunes: enable cd text burning in itunes 7 or greater under burning tab in preferences 09.18.06 00:11 gentoo: logsentry contains the logcheck package and runs in cron.hourly by default 09.19.06 12:59 macosx: /etc/ld.so.conf does not exist on mac ... can try setting environment variables ld_library_path and dyld_library_path to have same effect 09.19.06 13:20 latex: ctl-c-b compiles latex, to pdf i think 09.19.06 16:36 mysql: if you forget your root password, kill mysql, edit a file and place SET PASSWORD FOR root@localhost = PASSWORD('MyNewPassword'); in it, and issue a mysqld_safe --init-file=path/to/file & 09.21.06 13:00 matlab: oldunits = get(gcf,'units'), set(gcf,'units','normalized','position',[0 0 1 1]), set(gcf,'units',oldunits ) 09.21.06 17:18 gcc: gcc-config helps to choose current gcc configure 09.25.06 01:23 bash: bc needs scale to be set before you can expect decimals to be kept around 10.03.06 16:20 perl: /s and /m modifiers can be useful when matching a flattened document w/ many newlines 10.04.06 12:17 shell: to find files greater than a certain byte size, say 1000 bytes, use find +1000c 10.05.06 00:03 macosx: this will block the ports over which microsoft office checks for other running copies: sudo ipfw add deny udp from any to any 2222 10.05.06 00:08 linux: if you see windows-style ^M newlines in a file, try tr -s 'r' 'n' to get rid of them 10.05.06 01:28 latex: to write argmax, \arg\max_{\theta} 10.05.06 11:36 macosx: to use a scroll wheel to get btwn pages in preview.app, go view->pdf display->continuous 10.09.06 14:17 lifehack: hit your floor and the door close butotn at the same time to get an express trip 10.09.06 15:02 windows: to change a password, net user ownername * 10.11.06 01:14 macosx: to disable dashboard, defaults write com.apple.dashboard mcx-disabled -boolean YES 10.18.06 08:18 matlab: try importdata to read data files with text and column headers 10.19.06 00:27 excel: to get a tab-delimited file w/o any quotes or commas (i.e. a matlab-happy file), format cells as numeric 10.28.06 14:16 x11: if sshing in an xterm gives funny formatting, try stty -parenb 11.17.06 09:46 matlab: to get a % to show in a sprintf-formatted string, use %% 11.21.06 16:34 network: when using a dynamic domain name to access a machine that is behind the same firewall you are behind, you need to add the domain name ip to the list of allowed ips, b/c the request shows as coming from your external ip, not internal. yah. 11.29.06 11:39 mobile: 800-373-3411 free 411, 800-555-TELL free info, 712-858-8883 free intrntl calls thru iowa, 888-363-7822 price comparison 12.05.06 13:57 linux: to set date, date mmddhhmm 12.05.06 22:22 macosx: when using fink, edit /sw/bin/init.sh and change prepend_path to append_path so that, for instance, resource forks are preserved when tarring 12.05.06 22:54 macosx: rsync -E to preserve resource forks 12.06.06 15:42 bash: $! gives the process id of the last backgrounded process 12.14.06 11:31 cu: cu uses wrapped port ssl 12.14.06 14:34 emacs: ispell, flyspell to spell check 01.02.07 20:37 macosx: power button, then s gives shutdown screen 01.15.07 22:45 excel: to replace highlighted cells with an entry, use ctrl-enter 01.16.07 18:47 macosx: hold down option key in preview, drag an area, see dimensions 01.26.07 12:52 macosx: to auto-hide menubar and dock, edit info.plist for application and add, in alphabetical order, LSUIPresentationMode \ 4 01.29.07 10:18 word: on mac, widen window so ovr is visible. then toggle for insert/overwrite mode 01.30.07 16:03 google: use ~ to ask google to search synonyms of a word 02.06.07 11:27 perl: to substitute text in a bunch of files, perl -p -i .bak -e s/old/new/g file1 file2 ... 02.06.07 11:27 bash: use the script command to get a diary of an interactive session 02.09.07 17:43 matlab: M-x matlab-shell for interactive matlab 02.10.07 11:50 macosx: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport is nice tool for playing w/ airport 02.12.07 11:11 ipod: hold down cmd and option when connecting ipod to prevent autosync 03.01.07 14:13 perl: ord converts character to ascii equivalent 03.04.07 17:09 windows: mstsc /console to cheat and get a third remote desktop connection 03.09.07 23:03 perl: s///g will count the number of matches of a pattern 03.12.07 23:42 windows: change decimal value of HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber to have rdp listen on different port ... update windows firewall rules as needed 03.13.07 14:47 windows: shift-f10 for right-click context menu 03.14.07 13:08 matlab: to get ticks on top and right, use box on 03.18.07 12:30 macosx: to auto-accept ichat audio or video invitations, defaults write com.apple.ichat AutoAcceptVCInvitations 1 03.19.07 12:36 macosx: to reset file assocations, e.g. when office test drive refuses to let go, delete library/caches/com.apple.launchservices or library/preferences/com.apple.launchservices.plist 03.20.07 01:44 word: hold down alt (or option) key for vertical text selection 03.20.07 12:31 word: if you have a locked document, insert it as a file in a blank document 03.22.07 11:07 sge: when submitting a bash script to the queue, use #$ -S /bin/bash instead of #!/bin/bash 03.22.07 12:37 sed: to print from a pattern to the end of a file, sed -n /pattern/,$p 03.28.07 13:40 mobile: if you are stuck with a voicemail indicator, even though you have no new vm, call and leave yourself a msg. then check msgs, delete the new msg. 03.29.07 09:08 bash: anything you might look for here, check for on this wiki from greg/greycat first - http://wooledge.org/mywiki/BashFaq 03.29.07 10:48 matlab: ascii code to char, char(code); char to ascii code, uint8(char) 04.05.07 12:04 perl: to compare strings, use eq,ne ... 04.10.07 17:34 bash: paste will merge lines of different files 04.10.07 21:56 macosx: hold down option key while emptying trash to force 04.12.07 22:43 gmail: add recent: in front of username and email address when using pop to get copy of emails from last 30 days 04.19.07 23:41 macosx: cmd-shift-b to bluetooth transfer a file 04.25.07 22:04 macosx: to zoom, hold control, scroll w/ two fingers 04.30.07 09:21 cvs: to restrict write access, place user names in writers file of CVSROOT 05.01.07 10:35 firefox: firefox -remote "ping()" to find running windows, firefox -remote openURL(url,new-tab) to open in a new tab 05.01.07 14:31 firefox: cmd-k to get to search bar 05.01.07 14:45 firefox: use keyconfig.xpi extension to remap next/previous tab: gBrowser.mTabContainer.advanceSelectedTab(1); 05.01.07 19:07 latex: to shrink the auxiliary window, c-x ^ 05.02.07 11:23 macosx: show which processes are listening to which ports: lsof -i | grep LISTEN or lsof -nP | grep TCP or lsof -i TCP. don't forget to sudo. 05.04.07 09:19 grammar: who is interacting with whom 05.08.07 18:15 gmail: hold down shift to compose a gmail message in a new window 05.08.07 22:47 macosx: lsbom lists contents for a .pkg file, installer.pkg/Contents/Archive.bom 05.08.07 22:48 macosx: lipo will slim down universal binaries 05.14.07 02:51 latex: dots that are vertically centered: \cdots 05.16.07 11:53 debian: when apt-get update fails w/ a dynamic mmap error, add APT::Cache-Limit 33554432; to /etc/apt.conf.d/70debconf 05.17.07 16:31 bash: to get lines that are common to two files, use the comm command or grep -xF 05.22.07 07:38 gentoo: qfile finds package to which a file belongs 05.22.07 07:39 gentoo: qsearch searches package descriptions 05.22.07 07:40 gentoo: qlist lists files that belong to a package 05.26.07 07:16 google: use parens with a nickname after an address in google maps to give it a nickname for quick future reference 05.26.07 07:19 windows: to get to system properties quickly, use hotkey windows-break 05.26.07 07:43 firefox: to speed up browsing on a broadband connection: about:config, network.http.pipelining, network.http.proxy.pipelining to true; network.http.pipelining.maxrequests 30; create nglayout.initialpaint.delay as integer, set to 0 05.26.07 07:56 macosx: view->customize toolbar to add items to the finder toolbar 05.26.07 08:04 google: a ? in google reader brings up a help screen 05.26.07 08:21 firefox: to force links meant to open in a new window to open in a background tab, about:config, set browser.tabs.loadDivertedInBackground to true 05.28.07 21:40 google: enable phone to get notifications from google calendar, then text gvent with an appointment to schedule 05.30.07 12:09 google: append &imgtype=face to a google image search to get pictures of faces matching a query 06.05.07 20:25 macosx: ditto will copy resource forks (cp apparently will not) 06.10.07 06:01 matlab: to use rotated labels on x axis, try xticklabel_rotate from matlab central 06.10.07 06:03 matlab: pass pair Interpreter,none to stop matlab from interpreting labels or titles as tex, etc 06.10.07 06:11 matlab: to generate random integers from 1 to n: ceil(n*rand); round (instead of ceil) will get you in trouble 06.10.07 07:21 emacs: if annoyed by the file does not end in newline message, modify /usr/share/emacs/site-lisp/default.el so it does not set require-final-newline or remove default.el from .emacs file 06.10.07 08:26 video: to convert an flv to mpg, use ffmpeg: ffmpeg -i file.flv -ab audio_bitrate -ar audio_samplerate -b bitrate -s widthxheight file.mpg 06.18.07 08:14 google: use | for logical or operation, ~ for similar, .. to search a range of numbers, link: to find pages containing a link 06.18.07 08:20 windows: remove the word hide from application names in systemrootinfsysoc.inf to unhide in add/remove programs 06.18.07 08:21 macosx: click desktop while holding down command-option to hide all windows but finder 06.19.07 11:12 keynote: use keynote linkback w/ latexit, then map keyboard shortcuts using system preferences 06.19.07 12:23 latex: use \in for element of symbol 07.06.07 22:42 keynote: question mark for shortcut help 07.10.07 11:57 bash: bc -l gives sin, cos, etc 07.10.07 11:59 consumer: buy flights wed morn, books thurs, clothing thurs night, gas thurs morn 07.10.07 17:03 macosx: hold down apple-tab, two-finger scroll to switch applications 07.11.07 13:00 iphone: dial *3001#12345#* to bring up the Field Test tool, which will give you information about towers and signal strength, EDGE network, and more 07.13.07 17:08 bash: !! will give the arguments of the previously-executed command 07.16.07 17:45 bash: ctrl-r to search history 07.17.07 13:17 iphone: double tap on lower 1/4 of zoomed safari page to scroll by item at a time 07.18.07 11:10 iphone: tap and drag on day (in month view) to scan appointments 07.18.07 14:21 java: to right click on an embedded java applet using a mac trackpad, use a two-finger tap 07.24.07 10:05 cu: columbia ezproxy (useful for papers and command line scripts) is http://arugula.cc.columbia.edu:2048/login?url=%@, where %@ is destination url 08.07.07 16:27 iphone: field mode *3001#12345#*, account balance *777# and *225#, minutes used *646#, call forwarding *#21#, call forwarding number *#61#, 08.09.07 11:53 iphone: to reset, press and hold sleep/wake button and home button for at least ten seconds until the apple logo appears 08.10.07 19:15 macosx: in preview, hold down option and then rotate to rotate single pages of a pdf 08.14.07 15:08 macosx: to have finder show all files, defaults write com.apple.finder AppleShowAllFiles TRUE 08.14.07 18:06 bash: ${!#} for the last command line argument 08.17.07 09:11 lifehack: Hold a watch with 12 oclock at left. Move your arm so the hour hand points at the sun. The spot halfway between the hour hand and the 12 is south. 08.17.07 14:07 linux: gentoo now has a server USE flag, which might important for not breaking things like cvs server mode 08.20.07 07:45 iphone: to use recovery mode to wipe an iphone, hold down sleep/wake and home for 20-30 seconds; when yellow icon appears, connect to computer and restore in itunes 08.31.07 18:20 bash: run a command from your history using ! followed by the corresponding line number in your history 09.01.07 23:10 matlab: accumarray will turn pairs of nodes into an adjacency matrix 09.04.07 13:48 applescript: to convert posix path to alias, set theAliasPath to ((POSIX file thePOSIXPath) as text) 09.05.07 07:56 matlab: to create an adjacency matrix from lists of pairs, use accumarray(pairs,1) 09.06.07 10:12 iphone: to (stop)start ssh on iphone, use /bin/launchctl (un)load -w /Library/LaunchDaemons/com.openssh.sshd.plist or install UICtl app 09.07.07 11:54 iphone: change extensions to m4r and reimport to get free ringtones 09.07.07 13:32 imagemagick: to created tiled montage, use montage -tile CxR *.png montage.png, where C or R can be ommitted and labeling can be achieved with +label and -format w/ identifiers 09.07.07 13:33 latex: \, thin space; \; medium space; \ space; \quad quad space; \! negative space (can be repeated) 09.09.07 20:39 matlab: use mlint to check m files for problems, evaluate code efficiency, etc 09.12.07 12:22 matlab: use sortrows to sort by a given column, but keep rows together 09.12.07 13:10 linux: gentle restart: hold down alt and print screen, type REISUB 3 09.17.07 09:53 google: use set location to set a default location for google sms 09.18.07 10:08 matlab: use accumarray function to build a confusion matrix 09.18.07 23:38 cvs: use chmod -R g+s on cvs repository directory to set sticky group bit, ensuring that group ownership is inherited. is this a security problem? 09.24.07 14:13 windows: netstat -b 5 > activity.txt in command prompt to see machine connections 09.27.07 16:02 javascript: escape and unescape will convert between url friendly and unfriendly formats 09.27.07 16:04 cu: a bookmarklet to load current page through columbia ezproxy, for off-campus access to subscriptions: javascript:location.href=unescape('http://arugula.cc.columbia.edu:2048/login?url='+encodeURIComponent(location.href)) 09.28.07 10:39 macosx: window settings, keyboard, use option key as meta key 10.02.07 14:07 bash: check out xxdiff or tkdiff for gui that sits on top of diff 10.11.07 14:52 matlab: shading interp makes for pretty 3d plots 10.15.07 10:13 google: enable bibtex in google scholar preferences 10.18.07 09:12 macosx: strings finds printable strings in an object or binary file 10.18.07 15:13 latex: pagebreak "encourages" a page break, clearpage forces one 10.21.07 23:35 lifehack: lifetime of frozen foods: fruits/vegetables 8-12 months, poultry 6-9 months, fish 3-6 months, ground meat 3-4 months 10.23.07 10:57 macosx: use pmset to manage power management settings from the command line, including hibernate mode for safesleep, etc. 10.23.07 11:39 ipod: ~/Pictures/iPhoto Library/iPod Photo Cache can be deleted (and subsequently regenerated) to save some disk space if extraneous photos are cached 10.24.07 09:56 matlab: use ezplot to plot implicit functions 10.25.07 11:08 php: use the function print_r for a bare bones display of array contents 10.25.07 11:19 php: to sort associative arrays, use asort, arsort, ksort, and krsort 10.26.07 10:10 graphviz: pin and pos to fix a node position 10.26.07 10:10 graphviz: lp to change a label position 10.26.07 15:11 matlab: use the keyboard command in an m-file to stop execution and give control to the keyboard 10.28.07 17:19 graphviz: to get labels to appear below nodes, insert some newlines with \n\n 10.28.07 22:15 lifehack: get a yupp, qupp or z code for a bump from coach flight tickets 10.28.07 22:22 google: to enter google earth flight simulator, hit Ctrl+Alt+A (Mac users: Cmd+Opt+A) 10.28.07 22:39 macosx: in leopard, system/library/coreservices/screen sharing.app 10.28.07 22:39 macosx: to collect all windows from spaces, use c to collect all windows 10.28.07 22:42 macosx: in leopard, defaults write com.apple.dock no-glass -boolean YES; killall Dock to use a 2d dock 10.29.07 01:25 graphviz: use -Goutputorder=edgesfirst to get edges drawn first, in background, then nodes and labels 10.29.07 01:38 matlab: use textscan to read formatted text files 10.30.07 00:35 iphone: root password for 1.1.1 firmware is alpine 10.30.07 10:39 macosx: to create a new tab in leopard terminal, cmd-n. to cycle through, 'cmd+/-' 11.01.07 10:38 emacs: add "(add-hook 'LaTeX-mode-hook 'flyspell-mode)" to .emacs file to get on-the-fly spelling checking that respects latex 11.01.07 10:53 emacs: for interactive spell check, M-x ispell-buffer 11.03.07 10:09 matlab: griddata will interpolate for 3d plots 11.06.07 11:24 windows: driverquery can be used to do a local or remote list of drivers on xp, 2003, and vista 11.06.07 11:40 shell: change your default shell using chsh -s /path/to/your/shell username 11.08.07 20:17 macosx: in leopard, use qlmanage -p filename to quick look a file from the command line 11.09.07 02:06 shell: use --bwlimit option to specify max bandwidth in rsync, in kbps 11.09.07 02:46 macosx: in leopard, check /Library/Application Support/HWPrefs for CPUPalette to see your cores in action 11.09.07 02:53 macosx: in leopard, preview reloads changed files automatically -- great for tex 11.09.07 13:19 macosx: in leopard, jump to messages by typing names or subject lines 11.10.07 12:42 rss: to make a yahoo pipes rss regex pattern ignore case, put (?i) at the beginning of the pattern 11.12.07 18:00 macosx: ctrl-f2 gives the menu bar, ctrl-f3 gives the dock (remember fn key on a laptop) 11.16.07 14:30 macosx: in tiger terminal, command-double click to open a url in a browser 11.21.07 14:06 macosx: use search fields like from:,to:,subject:,email: in mail.app on 10.5 (and 10.4?) 11.21.07 15:07 lifehack: present 70% of what prepared 11.26.07 16:40 macosx: in leopard, screen sharing app (essentially a vnc viewer) is in /System/Library/CoreServices/ 11.26.07 16:59 macosx: in leopard, the image displayed behind the login window is /System/Library/DefaultDesktop.jpg 11.26.07 20:59 macosx: in leopard, you can drag widgets to your desktop after: defaults write com.apple.dashboard devmode YES; killall Dock 12.04.07 09:29 windows: turn on cleartype at http://www.microsoft.com/typography/cleartype/tuner/Step1.aspx 12.04.07 22:10 latex: to force capitalization in a bibtex entry, use surrounding brackets {} 12.06.07 12:43 macosx: using expose, hit option key to see window titles 12.06.07 12:44 macosx: to restart all graphics, closing open programs, sudo killall -HUP WindowServer 12.11.07 14:40 macosx: in leopard, activate spaces and hit the number of the space to go to 12.12.07 11:53 matlab: echo will echo m files during execution 12.13.07 11:08 google: a bookmarklet to search the domain of the current site you are viewing for a specific query: javascript:Qr=prompt('Search%20Site%20for','');if(Qr)location.href='http://www.google.com/search?&q=site:'+encodeURIComponent(window.location.hostname)+'+'+escape(Qr) 12.13.07 11:09 javascript: to grab the domain name of the current url, use window.location.hostname 12.16.07 11:58 windows: start -> run shutdown -f -t 0 for a quicker shutdown 12.18.07 23:07 matlab: scatter command will plot points with different areas and colors 12.18.07 23:08 matlab: plotmatrix command will plot columns of two matrices against each other 12.18.07 23:11 matlab: to capture keys in a matlab gui, set the figure property KeyPressFcn (or KeyReleaseFcn) with the appropriate function handle 12.19.07 17:15 shell: to send POST data in shell scripts, use curl -d 12.19.07 22:52 matlab: colororder and linestyleorder control line styles and colors under vectorized plotting 12.21.07 09:32 flickr: append /date-taken-calendar to a flickr url to get a calendar display 12.25.07 14:51 matlab: use dlmread to read a delimited file w/ non-uniform number of columns 12.26.07 14:33 matlab: to call a function on button click, use set(gca,'buttondownfcn',@fcn) 01.03.08 18:41 firefox: hold down command and click-drag to get a column highlighted 01.15.08 18:12 matlab: use linkaxes to synchronize two different axes with each other 01.16.08 20:56 macosx: to start time machine from the command line, /System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper & 01.16.08 20:58 lifehack: "swear like a sailor" to get bounced from an automated phone directory to a real person 01.28.08 11:17 macosx: to spoof a mac address in leopard, sudo ifconfig en0 lladdr 00:00:00:00:00:00 02.02.08 11:25 macosx: when a disk will not eject, do "lsof +D " to find process ids using that disk 02.08.08 10:52 test: see how this works 02.08.08 10:54 shell: to view pages that require POST data, do curl --data-binary var1=value1&var2=value2 02.12.08 02:25 gmail: add a + between your username and the at sign to have a filterable custom address, e.g. user+filtertext@gmail.com 02.12.08 02:26 latex: use package listings to include verbatim files with many options, including line numbering, word wrap, and syntax formatting 02.13.08 11:34 macosx: dscacheutil -cachedump -entries Host shows cached domain names -- dscacheutil -flushcache clears this cache 02.15.08 14:04 network: use 4.2.2.1 as a permanently pingable server to test a network connection 02.18.08 11:57 mysql: if you receive an error about mysql.procs_priv not existing, use mysql_fix_privilege_tables (with, optionally, the --password= switch) 02.18.08 12:12 trac,mysql: due to bug with trac interacting with mysql, create the trac database as: CREATE DATABASE trac DEFAULT CHARACTER SET latin1 COLLATE latin1_bin; 02.25.08 11:14 networking,linux: use port knocking daemon (knockd) to perform network actions via tcp port activity 03.03.08 13:06 macosx: add shift-option to volume control (f4/f5) to change by quarter-block intervals 03.16.08 19:00 perl: chr converts ascii code to character 04.11.08 10:17 matlab: to keep a consistent height-to-color mapping on 3-d plots, use caxis 04.13.08 13:27 macosx: shift-drag in spaces to consolidate all windows from a given app into one space 04.13.08 16:28 latex: to get something like a tilde to print, try \sim\!\! in math mode 04.15.08 15:44 matlab: if compiling mex files fails, it might be due to matopts.sh not being in the path -- an ln -s matlabroot/bin/matopts.sh . might get around this 04.22.08 09:31 macosx: /Applications/Utilities/Console.app is a nice gui with which to monitor logs 04.22.08 13:23 shell: wget -mk will mirror a site and replace absolute links with relative ones, good for local browsing 04.23.08 19:23 mysql: if you do not have lock permissions on a mysql server and want to do a mysqldump, use the --skip-lock-tables option (with caution) 04.23.08 22:19 matlab: use the publish command to generate html from scripts 04.24.08 12:46 emacs: reftex-mode with C-= allows you to jump between sections, references, etc. 04.24.08 12:49 emacs: C-x 3 splits windows vertically 04.24.08 12:50 emacs: C-x o switches between windows 04.24.08 13:11 emacs: C-c ( to navigate references, e.g. equations, figures, etc. 04.24.08 13:18 emacs: C-c [ and a regex will bring up matching bibtex references for insertion 04.26.08 20:01 latex: use \nonumber to avoid numbering a line of an eqnarray 04.28.08 22:23 emacs: use C-u C-spc to return to a marked location 04.30.08 12:31 latex: to span a figure over columns in twocolumn mode, use \begin{figure*} ... \end{figure*} 04.30.08 18:20 matlab: clc clears command window, clf clears figure, cla clears axis 04.30.08 23:19 matlab: use dbstop if error to debug code, which will give you access to workspace inside of function 05.02.08 15:19 safari: to change the safari user agent, go preferences -> advanced -> show developer menu, then select from the menu accordingly 05.02.08 15:21 iphone: to get access to starbucks free wifi for iphone users on a regular browser, trying changing the user agent to Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3 05.05.08 13:54 google: go to a support page and download the help by appending ?fulldump=1 to the url 05.05.08 14:11 windows: ctrl-esc opens the start menu 05.06.08 23:05 latex: to force parens around a cite, use \citep 05.13.08 19:04 latex: to include eps figures in a pdftex or pdflatex document, use \usepackage[pdftex]{graphicx} \\ \usepackage{epstopdf} 05.22.08 16:11 matlab: if matlab is hanging on startup, you might have a corrupt toolbox cache; change this by removing ~/.matlab//toolbox_cache*.xml 05.25.08 20:43 matlab: to rotate axis labels in matlab, try rotateticklabel from matlab central 05.30.08 16:28 matlab: dualcursor gives display of coordinates 06.02.08 22:38 cvs: to tag a set of module files (or the whole module, for e.g. a file release) use cvs -q tag 06.03.08 15:28 cvs: if you get an error for sticky tag is not a branch, try cvs update -A 06.04.08 09:57 macosx: to enable php in 10.5, uncomment the LoadModule php5_module line in /etc/apache2/httpd.conf and cp /etc/php.ini.default to /etc/php.ini 06.17.08 10:07 macosx: ctrl-click on a url in terminal.app to open it in your default browser 06.17.08 10:08 python: to see where module files are located, use python -c "import mymodule; print mymodule.__path__" 06.22.08 13:32 macosx: to recover a hard drive icon that has disappeared from finder: http://docs.info.apple.com/article.html?artnum=307503 06.23.08 10:06 python: use a backslash to accomodate multiline statements/expressions 06.23.08 15:31 shell: using more (or less), / searches, k highlights matches, n goes to next match, and v opens in editor set by VISUAL or EDITOR environment variable 06.23.08 18:59 firefox: (on a mac) alt-arrow gets to beginning/end of line, option-arrow goes forward/backward by word 06.30.08 11:36 macosx: to change primary displays on a dual monitor setup, drag the white menu bar in system preferences, displays to the desired blue box 07.01.08 10:28 shell: check man bash, history expansion to learn many history tricks 07.01.08 18:20 matlab: to get figures to print with non-white backgrounds, use set(gca,InvertHardCopy,off); 07.11.08 11:30 macosx: to speed up mail.app, try sqlite3 ~/Library/Mail/Envelope\ Index and then vacuum subjects; followed by ctrl-d to quit 07.12.08 05:29 iphone: with iphone 2.0, hold down the home button and press the lock button to take a screenshot 07.16.08 10:44 python: zip(l1,l2) returns list of tuples, where each tuple conains i-th element from each argument sequence 07.16.08 10:46 python: fcn(*x) explodes elements of x before passing to function fcn; useful for zip(*l) to rearrange list of tuples 07.16.08 19:25 macosx: opendiff uses FileMerge to visualize diff between two files 07.25.08 16:58 shell: when using a colored prompt, end with "\[\e[0m\]" to restore "normal" color 07.25.08 16:59 python: to “invert” an array or list containing values of arbitrary type, try this: invarr = dict([ [arr[i],i] for i in range(len(arr)) ]) 07.28.08 11:37 sed: to print text between two patterns, inclusive, use sed -n /pattern1/,/pattern2/p 07.29.08 10:58 shell: use pushd dir_name to change to a directory, storing the current directory, and popd to return to the stored directory 07.29.08 15:19 python: to combine dictionaries d1 and d2, use d1.update(d2) 08.04.08 19:06 latex: to typeset piecewise functions that are aligned, use the cases environment in the amsmath package 09.15.08 13:54 emacs: M-; comments a line, and M-x comment-region comments entire blocks 09.16.08 13:32 matlab: use "format compact" to reduce whitespace in output 09.16.08 20:43 shell: banner -w 50 foobar will print foobar in ascii art 09.26.08 11:09 ssh: if key-based login is not working, make sure permissions are correctly set on ~/.ssh (drwx------) and ~/.ssh/authorized_keys2 (-rw-------) 10.03.08 16:12 macosx: use the -n switch with open to run multiple instances of the same program 10.07.08 12:04 emacs: run a makefile with M-x compile or C-x m 10.09.08 14:47 latex: make sure to always put figure labels *after* captions, as references will otherwise be incorrect 10.11.08 13:30 macosx: flash files are often cached in /var/folders, so do a find /var/folders -name FlashTmp* 10.14.08 16:40 macosx: to toggle system-wide socks proxy, use sudo networksetup -setsocksfirewallproxystate Ethernet 10.14.08 16:41 macosx: to check system-wide proxy settings, use scutil --proxy 10.14.08 16:48 shell: use exec bash in ~/.login to auto-run a bash shell when your default is csh or tcsh 10.16.08 16:31 shell: to use the tinyurl api, append the url to be tinyed to http://tinyurl.com/api-create.php?url= 10.17.08 09:13 iphone: to save some disk space, remove old iphone firmware from ~/Library/iTunes/iPhone Software Update, but make sure to keep the latest restore 10.18.08 09:19 matlab: matlab stores sparse matrices in compressed column format, so loops over columns are much faster than over rows (loops over rows should be implemented as loops over columns of the transpose) 10.28.08 21:46 css: to modify an element style in a header, e.g. anchors in h1, use h1 a { ... }