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 http://bit.ly/1evsBGQ 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: 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: 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 { ... } 11.12.08 13:46 matlab: sprand is nice for making random sparse matrices 11.18.08 10:28 matlab: use startup.m and finish.m in ~/.matlab// to customize matlab startup and exit, respectively, including path modifications 11.18.08 10:34 matlab: isunix is true for a unix machine (see also ispc, ismac, and computer) 11.18.08 10:42 matlab: the savepath (or pathtool) utilities alter $MATLABROOT/toolbox/local/pathdef.m 11.20.08 10:21 matlab: to search for m files that include private functions, use which -all 11.20.08 10:25 matlab: to use a variable to define a structure field to be accessed, use parens, e.g. mystruct.(varname) 11.20.08 10:27 matlab: inputname(n) will give the variable name of the n-th function input 11.26.08 17:49 google: google suggest has an unofficial api that will return xml by using http://google.com/complete/search?output=toolbar&q=query 11.26.08 18:23 python: to generate the lower case alphabet as a list, use map(chr, range(97, 123)), for uppercase use map(chr, range(65,91)) 12.17.08 19:20 macosx: to change where sent messages are saved, highlight a folder, select mailbox->use mailbox for->sent mail 12.22.08 11:30 python: use help(), modules in the python interpreter to get a list of all available modules 12.22.08 11:52 python: use the sys module to view/modify the python path, via sys.path 12.23.08 11:27 macosx: in leopard, you can mute the volume-changing sound by pressin shift while hitting f4/f5 12.23.08 17:59 shell: use ldd to see shared library dependencies 12.27.08 08:12 macosx: rm /var/db/.AppleSetupDone to force setup assistant to run on next boot 12.29.08 06:48 google: to access starred items in google reader after logging in, use http://www.google.com/reader/atom/user/-/state/com.google/starred?n=100, where n=100 controls the number of items returned 01.03.09 15:17 python: to read delimited files in numpy, use loadtxt/savetxt 01.05.09 00:11 python: beautifulsoup does not like empty attributes, such as td nowrap, which produces a TypeError; remove empty attributes to avoid this 01.06.09 10:46 windows: to turn off automatic login, start->run, type control userpasswords2, click ok 01.07.09 18:16 firefox: to change the default handler for rss feeds, change web feeds in application preferences 01.08.09 14:04 python: in ipython, type object_name? to get information about that object 01.08.09 14:09 python: in ipython, use %run to run a script and load data into an interactive namespace 01.08.09 15:01 python: to print without a newline add a comma, e.g., print x, 01.08.09 15:03 python: when looping over a large array, use the iterator xrange instead of range to save memory 01.11.09 10:07 shell: use */ in a crontab to specify a repeating range, e.g. */5 * * * * /path/to/script to run a script every 5 minutes 01.12.09 18:47 python: to check if a float is not-a-number (NaN) use float(x) == "nan" 01.12.09 18:49 python: another test for NaN: type(x) is float and x != x 01.20.09 01:07 python: to print without a newline or space, use sys.stdout.write() 01.20.09 01:07 python: to force print to display to stdout now, use sys.stdout.flush() 01.22.09 11:14 firefox: to manage profiles in firefox, use the --profilemanager switch from the command line 01.28.09 14:25 bash: to prevent shell history from being saved to .bash_history, unset HISTFILE before logging out 01.28.09 14:42 shell: use ls -e to see access control lists (ACLs) and chmod -N to remove them 01.30.09 09:31 macosx: boxee will take control of apple remote by default, but settings->hardware and system will modify this 01.30.09 12:41 shell: tset and reset will (re)initialize terminall settings, including columns, lines, etc. 02.02.09 15:31 macosx: in mail.app, go window->previous recipients to edit the auto-fill address list 02.03.09 15:11 python: for basic http authentication, create a password manager with HTTPPasswordMgrWithDefaultRealm and handler with HTTPBasicAuthHandler 02.05.09 14:01 matlab: use datetick and datenum to get date formatted tick labels 02.11.09 12:04 python: to make a client side image map from a matplotlib image, use the transform function: http://bit.ly/RZFP http://bit.ly/1HTvAi 02.12.09 10:28 google: to search with a range of numbers, use ellipsis points, e.g. google 1998...2008 02.18.09 00:29 ruby: use request.env to access user related and server side variables: http://bit.ly/16fYa3 02.18.09 12:22 python: fast dictionary sory-by-value: sorted_items = sorted(my_dict.items(), key=lambda x:x[1]) http://bit.ly/15Bg2 02.18.09 12:23 python: faster dictionary sory-by-value: sorted_items = sorted(my_dict.items(), key=operator.itemgetter(1)) http://bit.ly/15Bg2 02.18.09 12:25 java: if maximum heap size is exceeded, use the -Xmx switch, e.g. java -Xmx512m 02.18.09 12:26 python: to convert different encoding to ascii, ignoring non-convertible characters, use my_str.encode('ascii','ignore') 02.18.09 12:31 wordpress: to list all tags for a given post, use the_tags function: the_tags('before_str','separator_str','after_str') http://bit.ly/QDBqs 02.18.09 12:34 wordpress: to list all pages (not posts), use wp_list_pages: 'wp_list_pages('title_li=&echo=...') http://bit.ly/72dA 02.18.09 18:31 flickr: append /nearby to geotagged photos to see photos taken nearby 02.19.09 10:33 python: use GetCurrentScrap from Carbon.Scrap to manipulate the mac osx clipboard (alternative: pbpaste/pbcopy commands) http://bit.ly/WpEYw 03.03.09 17:31 svn: to set the client for remote access in svn, use export SVN_SSH=... (similar to CVS_RSH) 03.05.09 22:47 python: use datetime.strptime to convert a formatted string to a datetime object in python 2.5+ http://bit.ly/16Yis 03.05.09 23:10 python: to convert a datetime object to a unix timestamp (seconds since 1970) in python 2.5+, use datetime.strftime("%s") 03.06.09 16:06 bash: to read a password silently (without echo-ing), use read -s -p "password: " varname http://bit.ly/yE4ht 03.06.09 16:31 python: use calendar.monthrange to get the number of days in a given year/month http://bit.ly/hAX4 03.09.09 16:57 shell: to insert a tab on the command line (e.g. for tab delimited sort -t), hit ctrl-v, then tab http://bit.ly/V6320 03.10.09 16:45 emacs: to insert a tab while in a mode that usually interprets tabs, try C-q http://bit.ly/lMFF 03.11.09 10:52 python: to download large files use urllib.urlretrieve or mechanize.Browser.retrieve http://bit.ly/2tcA http://bit.ly/wi6q 03.11.09 17:20 python: to set timeouts for urllib, urllib2, httplib, etc., use socket.setdefaulttimeout http://bit.ly/1qpu 03.12.09 15:59 sed: to keep part of a pattern for substitution, use parens+backslash, e.g. s/123\([xyz]\)/\1/ http://tinyurl.com/aaw7q 03.12.09 16:51 latex: use \pdfpagewidth and \textwidth (same for height) to scale the size of a document 03.12.09 17:50 python: the fileinput module transparently deals with inputs from arguments or stdin http://bit.ly/kUZa3 03.16.09 16:10 shell: to create variables with default values in bash, use echo ${myvar:=default} http://bit.ly/ev7il 03.16.09 16:17 shell: to create array variables in bash, use myarr=(alpha beta gamma); echo ${myarr[2]} http://bit.ly/qko2S 03.18.09 13:46 unix: nice reference for converting times to/from unix timestamps in various languages: http://bit.ly/9OBOc 03.19.09 12:06 latex: to include a table of contents, use the pdftex package: \usepackage[pdftex, bookmarks=true]{hyperref} 03.20.09 11:21 javascript: to see if an object has an attribute, try myobj.hasOwnProperty("attribute") http://bit.ly/3eKFeE 03.24.09 10:57 firefox: a vacuum places.sqlite in your firefox profile may reduce database size and decrease load time http://bit.ly/MhMy 03.24.09 11:02 linux: use sudo iosnoop to snoop i/o events as they occur (#macosx friendly as well) 03.24.09 22:24 macosx: to force new window links to open in new tabs in safari, use defaults write com.apple.Safari TargetedClicksCreateTabs -bool true 03.26.09 15:33 emacs: to cipher the current buffer using rot13, use M-x toggle-rot13-mode http://bit.ly/3A2X3 http://bit.ly/2jUZS 03.30.09 11:43 awk: to print all lines where, e.g., the second field matches a regex use awk '$2 ~ /regex/' http://bit.ly/BVnN 04.02.09 13:24 matlab: use the datetick function to get date formatted tick labels. useful with rotation. http://bit.ly/I1c0 http://bit.ly/1FnSNe 04.03.09 11:56 macosx: to reduce pdf file size in preview, try save as, set quartz filter to reduce file size 04.07.09 13:38 firefox: to force extensions to work with beta versions of firefox, create about:config entry for extensions.checkCompatibility=false http://bit.ly/BG0uR 04.07.09 14:16 python: to properly delimit a percent sign for printing in a string, use two percent signs, e.g. print %% gives % 04.07.09 15:04 python: use os.path functions split, splitext, join, etc. for manipulating file paths http://bit.ly/85qWo 04.22.09 11:44 latex: if margins are rendering incorrectly with latex->dvips->ps2pdf, try dvips -t letter http://bit.ly/15kuY4 04.22.09 11:54 latex: use pdffonts to check whether fonts are embedded in pdfs http://bit.ly/T0DCr (another tip via @ssuri) 04.23.09 10:37 linux: to see available ram, use free -m | xargs | awk '{print $17 "MB"}' (via @jazzychad) 04.29.09 11:31 emacs: using M-x describe-bindings (or C-h b) to see all shortcuts for current buffer http://bit.ly/GtGLU 04.29.09 11:32 emacs: use M-x apropos (regex) to search for commands by regex http://bit.ly/GtGLU 04.29.09 11:33 emacs: use M-x info to see the interactive emacs menu-driven info engine http://bit.ly/GtGLU 04.29.09 17:02 mac: gprof is broken for profiling c/c++ code on intel macs. use the saturn tool instead http://bit.ly/vPeRT http://bit.ly/aiR37 04.30.09 09:32 hadoop: streaming jobs can access jobconf vars, e.g. mapred.map.tasks->$MAPRED_MAP_TASKS http://bit.ly/3wEkTZ (via @tlipcon) 05.01.09 11:57 bash: poor man's note-taking command: alias note="emacs ~/note_`date +%Y%m%d%H%M`.txt" (via chw: http://bit.ly/vVucy) 05.01.09 17:41 latex: use the geometry package to set margins: \usepackage[left=1in,top=1in,right=1in,bottom=1in]{geometry} http://bit.ly/bd4gT 05.05.09 11:54 wordpress: to avoid failure on popular posts, create a static page copy http://bit.ly/11uYch (via @mjmalone) 05.13.09 10:55 hadoop: use job.end.notification.url to specify a url to be called at job completion http://bit.ly/3PMKd 05.13.09 14:44 macosx: a symantec utility to completely remove norton anti-virus http://bit.ly/GGTeD 05.18.09 17:50 python: use StringIO (unicode, slower) and cStringIO (ascii only, faster) to treat strings as file streams http://bit.ly/Aqf2y 05.18.09 19:21 python: use optparse as an advanced alternative to getopts for options parsing http://bit.ly/MaYfq 05.20.09 09:46 macosx: add recent documents, applications, or servers to the dock with a defaults write setting: http://bit.ly/Os2Oh 05.20.09 11:00 macosx: use /Applications/Utilities/Java/Java\ Preferences.app/ to set the default java version http://bit.ly/IlWvC 05.20.09 12:18 shell: pipe viewer is useful to monitor the progress of pipes handling lots of data http://bit.ly/2NSP 05.20.09 13:43 shell: use netcat (nc) to listen on and connect to network sockets http://bit.ly/JxFCA 05.26.09 11:29 python: use the tempfile module to generate temporary files and directories http://bit.ly/IuEMU 06.02.09 08:06 shell: use find . -mtime -1 to find files modified in the last day (-mmin -10 for last 10 minutes) http://bit.ly/q51xT (via @shellfu) 06.02.09 08:09 macosx: as an alternative to dscl for managing users/groups in osx 10.5, try server admin tools http://bit.ly/6pABd http://bit.ly/18dRPK 06.08.09 09:56 macosx: to convert microsoft office 2007+ docx/ptptx to doc/ppt, use http://bit.ly/ByCHQ or zamzar.com 06.09.09 10:57 python: use dir(x) or x.__dict__.keys() to get a list of fields an object or module defines http://bit.ly/UAVN 06.09.09 13:03 python: use codes.open(filename,mode,encoding) to read/write with transparent encoding/decoding for, e.g. unicode http://bit.ly/16mfnU 06.09.09 13:12 python: quick fix to print with unicode characters replaced by ?: print repr(uni.encode('ascii','replace')) http://bit.ly/kT4KX 06.12.09 17:18 ssh: use the -C option when scp-ing text for a compression speed-up (via @ssuri) 06.12.09 17:20 shell: use cd - to return the previous working directory (also via @ssuri) 06.16.09 18:11 java: appending Strings with += is very slow; use StringBuffer.append() instead http://bit.ly/wIS6A (via @ssuri) 06.16.09 18:12 python: use a join wrapped around a list comprehension for fast string appends http://bit.ly/K4vsr 06.24.09 13:58 shell: use sort's -S option to set main memory buffer size to speed up large sorts (via @eytan) 06.29.09 17:43 macosx: use sudo ifconfig en1 lladdr 00:11:22:33:44:55:66 to spoof your airport mac (hardware) address http://bit.ly/VXZin 07.13.09 18:09 matlab: use spdiags to row-wise (or column-wise) normalize a sparse matrix http://bit.ly/v4xbm (via @ssuri) 07.15.09 23:25 google: use postfix to send smtp gmail from the command line on mac/linux http://bit.ly/qKECQ 07.28.09 13:20 python: return rows as dicts with mysqldb using the DictCursor class http://bit.ly/56bBm 07.28.09 13:21 mysql: use show tables like "table_name" to see if a table exists http://bit.ly/SjdBG 08.04.09 13:12 macosx: to fix 403 forbidden error on apache in 10.5 (leopard), create appropriate /etc/apache2/users/user.conf file http://bit.ly/242lt 08.06.09 13:22 shell: script from @dreev to transparently use gnu screen over ssh for persistent logins http://bit.ly/lYNtG 08.10.09 17:54 matlab: use java.util.Hashtable for a hashtable http://tinyurl.com/d5rwv6 08.17.09 17:32 networking: use tcdump to capture packet traffic sudohttp://bit.ly/COr2z 09.17.09 13:50 python: to create a list of repeated values, us the * operator: [1]*5=[1,1,1,1,1] http://bit.ly/c7X3Q 10.12.09 21:20 python: to create a nested defaultdict of defaultdicts, use d = defaultdict(lambda : defaultdict(int)) http://bit.ly/tUbev 11.15.09 10:32 bash: use parameter expansion to remove file extensions in shell scripts, e.g. ${file%\.*} http://bit.ly/4mJ8ev 11.17.09 16:51 shell: use !, ^, etc. for quick navigation of previous commands http://bit.ly/1BLVdt 11.19.09 11:20 python: quick and easy way to remove non-ascii characters from a string: filter(lambda c: ord(c) < 128, s) 11.27.09 19:24 python: remove html or xml character refs (e.g. ’) and entities from text string: http://tinyurl.com/b2gjhr 12.05.09 20:24 macosx: to boot snow leopard with a 64-bit kernel, hold down 6 and 4 on startup http://bit.ly/Ejsud 12.07.09 08:59 shell: use the -P option in xargs for simple parallelization, esp nice for multicore, e.g. xargs -n1 -P4 http://bit.ly/7ZEzjI 12.31.09 10:55 macosx: to fix font problems in preview on leopard, killall ATSServer http://bit.ly/6Ksdi3 01.05.10 15:54 shell: many cheat sheets for bash, sed, awk, screen, etc. at http://bit.ly/zIZ18 01.05.10 15:57 macosx: use cupsfilter to print documents to pdfs from the command line, cupsfilter foo.txt > foo.pdf http://bit.ly/6i4wTC 01.07.10 13:00 macosx: email aliases are easy to use in mail.app -- just comma separated list http://bit.ly/V6QkS 01.07.10 15:53 rstats: use eval(parse(text="...")) to evaluated a string expression http://bit.ly/5yJ2Hz 01.07.10 15:55 rstats: use paste(v, collapse=" ") to join a vector to a string http://bit.ly/81mI7i 01.12.10 15:51 macosx: use pbpaste/pbcopy to paste to or copy from the clipboard from the command line http://bit.ly/6HrXA8 01.28.10 12:13 macosx: command-click and drag to remove a menu bar item, e.g. eject button on upper right 01.28.10 12:17 python: use matplotlib.use("agg") to force a non-gui backend, useful for (cgi) scripts on headless machines http://bit.ly/cQ4qiQ 02.24.10 11:46 php: use a preceeding @ with a function call to supress warnings or errors 02.27.10 16:45 consumer: to restrict amazon searches to super saver shipping, append &emi=ATVPDKIKX0DER to the search url http://bit.ly/dlcI1T 03.02.10 10:21 rstats: use args <- commandArgs(TRUE) to process only custom arguments in Rscripts http://bit.ly/aFXnpz 03.04.10 15:58 macosx: hold down menu and next for 5 seconds to pair your apple remote with your mac http://bit.ly/AOekv 03.10.10 20:39 bash: use ${#string} to get the length of a string http://bit.ly/5shdh 03.10.10 20:42 bash: functions for simple date and time calculation in bash http://bit.ly/LixNT 03.15.10 13:59 rstats: use ellipsis points to define variable length arguments in function definitions: function(...) http://tinyurl.com/a8dvg 03.17.10 17:12 latex: use \includegraphics*[viewport=x1 y2 x2 y2,...] to crop figures (h/t @5harad) http://tinyurl.com/ykj94yl 03.17.10 17:58 latex: or use \includegraphics[clip,trim=dx1 dy2 dx2 dy2,...] to trim figures by given lengths (via @drewconway) http://bit.ly/dpC7ro 03.17.10 20:10 rstats: use file("stdin") to read from stdin -- e.g. from a pipe in an Rscript http://bit.ly/9bkHat 03.23.10 15:57 hadoop: to update a counter in streaming, write reporter:counter:,, to stderr http://tinyurl.com/ycwx9en 03.24.10 20:34 shell: use C-x C-e to edit the current command (in readline emacs mode; M-v in vi mode) http://bit.ly/99ETyV 03.26.10 20:00 hadoop: to call a url upon job completion, use -Djob.end.notification.url='http://...?jobid=&jobStatus=' 03.29.10 11:15 shell: to re-run the last command, replacing all instances of foo with bar, use !!:gs/foo/bar http://bit.ly/9PxyzY 04.01.10 10:46 python: use list comprehensions or itertools to flatten nested lists of lists http://bit.ly/6eDtt 04.16.10 14:28 rstats: use if(any(grep(pattern, string))) to avoid "missing value where logical needed" error http://bit.ly/9E62NT 04.16.10 14:47 rstats: nicer alternative to previous tip: use if(grepl(pattern, string)) for conditional on pattern match (via @hadleywickham) 04.30.10 11:16 bash: parameter substitution, including default variable values, string manipulation, etc. http://bit.ly/c71sPC 04.30.10 11:19 rstats: xtable http://bit.ly/94aWLs and outreg http://bit.ly/cqrDyt for converting tables (e.g. model summaries) to latex 05.28.10 11:06 shell: use grep -f to find intersection/difference btwn files http://bit.ly/cdY88T (via @commandlinefu) 06.04.10 10:45 hadoop: access input file names in streaming using $MAP_INPUT_FILE http://bit.ly/cRfB6k (more here: http://bit.ly/9EzL1u) 06.08.10 15:52 awk: to use multiple characters as field separators use a regular expression, e.g. awk -F"[<>]" for < or > http://bit.ly/cibp1l 06.23.10 11:41 macosx: fix page down/up for 06.23.10 11:43 macosx: fix page down/up for emacs in terminal.app by changing key mapping http://bit.ly/bLWnOl 07.02.10 17:02 rstats: use as.numeric(as.character(df$field)) to convert a field of factors to numeric 07.07.10 11:46 rstats: use match(x,y) to get an index of the (first) match of x in y, useful for re-ordering 07.09.10 17:04 rstats: use iconv to convert between encodings or to remove strings with invalid characters, e.g. iconv(s, to="utf-8") 07.09.10 17:05 shell: use iconv to convert between encodings http://bit.ly/dDnc3E 07.15.10 11:11 shell: use date --date=tomorrow tomorrow's date, relative dates, etc. http://bit.ly/bKmzPo 07.15.10 11:14 shell: use date -r $((`date +"%s"` + 24*60*60)) +"%Y-%m-%d" to get tomorrow's date on non-GNU platforms w/o -d, e.g. 07.15.10 11:17 shell: remove non-ascii, e.g. unicode, characters using perl -pe 's/[^[:ascii:]]//g' (via @chrishwiggins) 07.15.10 11:42 bash: several options to deal with for loops where elements have spaces in them http://bit.ly/dp1A1b 07.16.10 09:37 sed: nice 3 part series from gentoo, "sed by example" http://bit.ly/aaavNv 07.16.10 09:37 awk: nice 3 part series from gentoo, "awk by example" http://bit.ly/98jiD5 07.21.10 17:58 shell: efficiently sort large files using split and sort -m on multicore machines http://bit.ly/chPa4D (via @arnabdotorg) 07.22.10 13:54 rstats: use opts(axis.text.x=theme_text(angle=-90)) to rotate x axis labels in ggplot2 http://bit.ly/bvRXIF 07.26.10 18:52 shell: use the ssh escape character (default=~) to add port fwding to an existing connection http://bit.ly/bcDoCF (via @dggoldst) 07.27.10 17:31 rstats: use xvfb to run R on a server without X11 http://bit.ly/dBmrEb 08.06.10 12:13 sql: view column names/types in sqlite if .schema fails: SELECT * FROM sqlite_master where type=table http://bit.ly/cmiPPy 08.23.10 16:52 python: hidden features of python http://bit.ly/d4H2yw (via nyc python meetup) 09.08.10 11:37 macosx: terminal tips and tricks http://bit.ly/cdoTTb 09.21.10 14:51 shell: use sort -g to correctly sort numbers with possible scientific notation 09.28.10 10:17 shell: use whereis to find the location of binaries, source, and man pages 09.30.10 10:56 awk: use awk -v var=$bashvar to pass bash variables to awk scripts http://bit.ly/c4vjLc 10.18.10 12:48 macosx: go to about:plugins to enable the native chrome pdf viewer http://bit.ly/byEBLS 11.08.10 13:41 rstats: use opts(axis.text.x=theme_text(angle=45, hjust=1)) to rotate x axis labels in ggplot 11.09.10 14:57 rstats: use opts(axis.text.x=theme_text(angle=45, hjust=1)) to rotate x axis labels in ggplot 11.17.10 11:50 rstats: to remove legend titles in ggplot, use theme(legend.title=theme_blank()) 11.19.10 11:07 rstats: use opts(legend.position=c(0.85,0.85)) to move ggplot legends to upper right corner (h/t @drewconway) 11.30.10 19:46 svn: use svn resolve --accept working -R . to resolve tree conflicts http://tinyurl.com/3xa8g95 12.09.10 17:05 shell: use "cat a b b | sort | uniq -u > c" to get the set difference btwn lines of files a and b http://bit.ly/hG4aFy 12.14.10 17:12 latex: to remove figure numbers, either \usepackage{caption} with \caption*{} or \renewcommand\capstart[1]{} http://tinyurl.com/264vfan 12.20.10 13:22 shell: set operations in the unix shell, from @pkrumins http://bit.ly/h9jum0 (h/t @arnabdotorg) 12.23.10 11:15 emacs: use ctrl+l to center screen around a line 01.04.11 18:34 shell: use command > >(tee stdout.log) 2> >(tee stderr.log >&2) send copies of stdout and stderr to log files http://bit.ly/gtMXog 01.05.11 13:15 latex: use \usebackgroundtemplate{\includegraphics{...}} to incorporate full screen image slides in beamer http://bit.ly/efZkLw 01.11.11 10:53 rstats: use expand.grid to create a dataframe w/ all combinations of given vectors and factors http://bit.ly/dOeFUV 01.11.11 17:11 macosx: to remove incorrect autosuggest in mail.app, edit "previous receipients" from the window menu 01.12.11 12:13 macosx: edit SearchViewSettings in com.apple.finder.plist to enable view/sort by size in spotlight http://bit.ly/gJRFVS 01.12.11 22:01 javascript: compute set differences using filter and indexOf A.filter(function(x) { return B.indexOf(x) < 0 }) http://bit.ly/ejdAcD 01.14.11 19:20 hadoop: use -inputformat WholeFileInputFormat to process full files as records http://bit.ly/dHFWBm 01.25.11 09:28 php: big-o notation for various php operations http://bit.ly/eEk34O 01.27.11 14:39 shell: use newgrp to change the default group under which new files are created http://bit.ly/fGtlMl 01.27.11 16:04 python: use coo_matrix as scipy substitute for matlab's accumarray, e.g. for confusion matrices http://bit.ly/fZZwQ0 02.02.11 12:53 python: remove whitespace in matplotlib figures with savefig(bbox_inches="tight",...) http://bit.ly/hD4XUQ 02.15.11 10:10 python: use python -mjson.tool as a simple one-liner to pretty print JSON http://bit.ly/fiQOqB 02.16.11 11:12 macosx: enable the OS X summarization service in snow leopard with sysprefs->keyboard->keyboard shortcuts http://bit.ly/eyD3cm 02.23.11 11:22 python: scrape html tables with a few quick lines of BeautifulSoup http://bit.ly/hyN1I4 02.25.11 14:16 python: use lxml.etree.HTMLParser as a faster alternative to BeautifulSoup when parsing HTML http://bit.ly/gvq5EY 02.28.11 11:02 macosx: disable adobe reader updater with launchctl in ~/Library/LaunchAgents http://bit.ly/h4EXY4 03.01.11 18:39 ssh: use ssh-keygen -y -f /path/to/private/key to regenerate a public key from a private key http://bit.ly/gkHkdP 03.03.11 11:00 git: add some color to git diff, etc., with git config --global color.ui auto http://bit.ly/iaSTpf 03.16.11 18:52 hadoop: in pig, count number of tokens in a chararray with ((to is NULL) ? 0 : COUNT(TOKENIZE(text).$0)) AS num_tokens 04.05.11 10:11 latex: use \begin{frame}[allowframebreaks] to span multiple slides, for, e.g., bibtex references http://bit.ly/i3iOLP 04.25.11 17:18 shell extract one random line from a file: sed -n $((RANDOM%$(wc -l < file)+1))p file http://bit.ly/fMp48b 05.04.11 11:31 mac: turn on the debug menu in safari with defaults write com.apple.Safari IncludeDebugMenu 1 06.12.11 10:05 bash: reference for history expansion in the shell http://bit.ly/lrw582 06.14.11 14:57 ssh: use ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no to disable host key checking http://bit.ly/igtkiP 07.24.11 15:06 python: use xpath("./text()") to grab text chunks from xml http://bit.ly/pOED6L 07.24.11 15:09 networking: the dd-wrt guide to saving your router (various resets, tftp, etc.) http://bit.ly/q4iV1C 07.27.11 15:22 shell: use disown to detach a process from a shell http://bit.ly/ojUN7u (h/t @mihasya) 08.05.11 16:14 c++: current date & time w/ boost::posix_time: to_extended_iso_string(second_clock::local_time()); http://bit.ly/qPTclz 08.18.11 16:30 linux: swap left alt and command keys with setxkbmap -option altwin:swap_lalt_lwin http://bit.ly/pNSwYN 09.20.11 13:30 awk: check if a variable is numeric in awk func isnum(x) {return x==x+0} http://bit.ly/pTDTXW 10.20.11 10:43 macosx: use jot as an alternative to seq for generating sequential and random numbers http://macw.us/pdfadN 01.18.12 19:49 rstats: (ab)use ggplot2 to connect x-axis factors via a line with geom_line(aes(x=as.integer(x), y=...)) 01.18.12 19:49 rstats: hide part of a legend in ggplot2 with legend=F in the scale, e.g. scale_size(legend=F) 01.18.12 19:53 rstats: a handy syntax reference for specifying statistical models in R: http://bit.ly/yza8SK 01.19.12 12:04 rstats: use geom_line(aes(group=1)) to connect x-axis factors via a line with ggplot2 (h/t @hadleywickham) 01.31.12 13:45 latex: a number of useful listings settings for inline code snippets http://bit.ly/Ai4fnu 02.08.12 14:57 shell: edit remote files (ssh -t host emacs -nw file) or bounce thru intermediate hosts (ssh -t host1 ssh host2) http://bit.ly/zKn02x 02.10.12 13:17 shell: real-time collaborative terminal sessions with gnu screen's multiuser mode: http://bit.ly/xRCAg3 (h/t @dggoldst) 05.15.12 07:31 macosx: use macfuse to mount linux partitions (ext2/ext3) http://bit.ly/JF8BQb 07.31.12 20:16 bash: try an until..do loop to automatically restart jobs instead of PID or psgrep (h/t @dggoldst) http://bit.ly/MZISmQ 08.09.12 19:49 rstats: use formatters in ggplot2 to modify axis labels, e.g. scale_y_continuous(labels=percent_format()) http://bit.ly/NNMt5f 08.10.12 15:34 ssh: use autossh to keep persistent ssh connections alive (e.g., for tunneling) http://bit.ly/O99kLM (h/t @dggoldst) 08.23.12 07:35 ssh: set ClientAliveInterval 300 in /etc/ssh/sshd_config to avoid timeouts and dropped connections http://bit.ly/NKssyq 08.27.12 15:56 rstats: change the order in which factors are plotted: transform(df, variable=reorder(variable, value)) http://bit.ly/SJQ89Y 08.30.12 08:36 python: use savefig(..., facecolor=black) to save figures with a black background http://bit.ly/O5GIBW 09.01.12 08:22 rstats: use droplevels to remove unused levels from a factor http://bit.ly/PWH9PI 10.22.12 15:36 macosx: use textutil to convert various text formats (e.g., html, word, rtf) to plain text (h/t @fdiaz_msr) 11.07.12 14:38 rstats: a thorough explanation of the hjust and vjust parameters in ggplot: http://bit.ly/SNt5LQ 11.08.12 11:39 shell: use fc to open the previously executed command in a text editor http://bit.ly/STQUT1 11.13.12 13:35 python: use the memory_profiler module to monitor line-by-line memory usage http://bit.ly/STio8g 11.14.12 20:31 linux: cat /etc/lsb-release to see ubuntu version information http://bit.ly/Sq5AWe 11.15.12 09:30 macosx: use various dtrace tools to snoop on I/O, processes, files, etc http://bit.ly/UG1Aqz 11.20.12 10:18 shell: the subtle difference between -J and -I in xargs, and other great tips from @charlesreid1 http://bit.ly/QVMH29 11.20.12 10:32 shell: wget accepts wildcards for accept/reject patterns, e.g. wget -r -np -A '*.zip' http://bit.ly/Xx2reZ 11.20.12 10:34 shell: curl supports brace expansion for multiple file downloads http://bit.ly/WtqnhN 11.26.12 15:16 macosx: remove zombie ical notifications by removing Library/Calendars/Calendar Cache http://bit.ly/TpDEpA 11.27.12 13:39 git: undo all uncommitted changes with git checkout -f HEAD http://bit.ly/10PTnRl 12.01.12 15:41 python: an cheatsheet for converting between python date and time formats http://bit.ly/11hnjpz 12.05.12 13:10 shell: use reshape, laminate, and paste to aggregate data http://bit.ly/QHGtBU via @chrishwiggins @drbunsen 12.05.12 21:55 latex use "\pdfinclusioncopyfonts=1" to embed figure fonts (e.g., zapfdingbats) in pdfs http://bit.ly/VxKZFX 12.26.12 16:06 shell: use csplit for pattern-based file splits into parts http://bit.ly/12FXK2i 12.26.12 16:10 shell: use column -t to pretty print tables 01.16.13 11:23 rstats: use rle to count and collapse sequence runs, similar to "uniq -c" http://bit.ly/S3g6ac 01.25.13 09:57 git: use git diff --color-words to show word (instead of line) changes http://bit.ly/WzJTWE 01.25.13 10:06 latex: todonotes provides an easy way to mark up comments http://bit.ly/WzLtb1 01.25.13 10:13 latex: use latexdiff to compare changes between document versions http://bit.ly/Vn3fSR 01.25.13 10:27 emacs: use M-x ansi-term with C-c C-j for an alternative shell http://bit.ly/Vn4yBa 01.31.13 23:10 rstats: use print(object.size(x), units="Mb") to display object size in memory http://bit.ly/W4JDjb 02.12.13 09:22 python: use prun in ipython for convenient time profiling http://bit.ly/VSd9qH 02.12.13 09:23 python: a handy reference for profiling, including timeit, run, cProfile, etc http://bit.ly/XytCje 02.12.13 09:24 python: use memory_profiler for quick and easy memory monitoring http://bit.ly/STio8g 02.13.13 10:02 shell: use LC_ALL=C to deal with illegal byte sequence issues http://bit.ly/XzYWhI 02.20.13 12:31 latex: tex2im is a simple shell script to convert bits of latex to images http://bit.ly/ZgXe7N 02.25.13 20:43 latex: use the fullpage or geometry functions to change margins http://bit.ly/15fd6uM 02.28.13 17:08 apache: use the QSA flag in mod_rewrite to add query parameters http://bit.ly/ZEMGzL 03.19.13 09:19 ssh: use ssh -R p1:sourcehost:p2 user@desthost to create a reverse ssh tunnel http://bit.ly/15XVCn2 04.25.13 09:54 macosx: unhide your library folder: chflags nohidden /Users/jakehofman/Library/ http://aol.it/10Ct6ZY 04.25.13 17:15 bash: use disown -h to retroactively nohup a running job http://bit.ly/ZRzJAw (h/t @ssuri) 04.29.13 14:28 rstats: use df[!duplicated(df),] to find unique rows of a data frame http://bit.ly/12daQ3u (h/t @dggoldst) 04.29.13 21:52 rstats: use the microbenchmark package to compare function runtimes http://bit.ly/10oDZau 05.01.13 14:21 rstats: .Last.value contains the most recent returned value http://bit.ly/ZWkv10 05.07.13 18:37 python: use ElementTree.itertext to convert html to readable text http://bit.ly/14226A0 05.15.13 10:32 git: restore a deleted file in a git repo http://bit.ly/YJikxv 05.17.13 11:17 rstats: use commandArgs to determine the path of a script and source local files http://bit.ly/15TkpN0 06.05.13 09:52 rstats: a nice overview of formula syntax for statistical models in R http://bit.ly/1b4cb1v 06.05.13 11:22 python: pretty print json with json.dumps(d, sort_keys=True, indent=4, separators=(",", ": ")) 06.17.13 15:11 python: use line_profiler for easy profiling of functions http://bit.ly/17TymKM 06.19.13 15:58 python: numba provides a simple one line decorator to speed up code http://bit.ly/19j4c1m 06.19.13 16:14 bash: set HISTCONTROL=ignorespace to exclude space-prefixed commands from history http://bit.ly/17nv1nV 06.19.13 16:54 linux: various ways to mount windows (samba) shares http://bit.ly/11yUUcD 06.20.13 08:50 rstats: use outer() to compute the outer product of two arrays http://bit.ly/19kDGVw 06.20.13 09:16 rstats: use dput() for easy object serialization http://bit.ly/19kGDp9 (h/t dggoldst) 06.20.13 14:13 python: open files in universal newline mode with open(...,"rU") to avoid csv errors http://bit.ly/16Pzufp 06.21.13 11:51 latex: a convenient list of latex fonts: http://bit.ly/11S8bNp 06.21.13 13:59 rstats: use coord_cartesian to change the grid view, zoom in, etc. http://bit.ly/1c4w2yb 06.21.13 14:01 rstats: use annotate("text", x=10, y=20, label="text", hjust=0, vjust=0) for easy text plotting http://bit.ly/11su2OO 07.19.13 10:54 rstats: use revalue or mapvalues in plyr 1.8+ to rename factor levels http://bit.ly/14mECt5 http://bit.ly/13tXIvu 08.01.13 10:18 macosx: use Instruments.app to profile code (h/t @davidblei) http://bit.ly/17lHbrv http://bit.ly/14l5ACE 09.11.13 09:21 shell: makefiles for data workflows http://bit.ly/1d5zHxW 09.20.13 14:36 macosx: create custom dns rules in /etc/resolver http://bit.ly/18GGcZ1 09.23.13 13:39 meta: bash alias to search these tips: alias gtip="curl -s http://jakehofman.com/lists/tips.txt | grep -i" 10.02.13 17:11 iphone: type ok maps into google maps search to cache maps http://bit.ly/18upE3T 10.09.13 13:12 latex: control widow and orphan text by changing penalties http://bit.ly/1cvYTAj (h/t @mikegartrell) 10.12.13 12:16 linux: use dpkg --get-selections to get a list of installed packages http://bit.ly/19HJrQu 10.15.13 10:32 shell: use set -o noclobber to avoid redirect overwrites http://bit.ly/GZtsRK (h/t @chrishwiggins) 10.24.13 11:08 macosx: disable screenshot shadows with defaults write com.apple.screencapture disable-shadow -bool true (h/t @sztul) 10.24.13 13:09 macosx: create a bootable usb installer for mavericks 10.9 http://bit.ly/1aehyvM 10.30.13 10:00 xml: some handy xpath examples http://bit.ly/1dNg1C2 http://bit.ly/1dNghBb 11.20.13 03:15 macosx: recover missing windows using the window->zoom menu option http://bit.ly/IfKFpQ 12.02.13 10:15 silverlight: set manual buffer rates for better streaming video with shift+ctl+option+s http://bit.ly/1jbXmRp 12.02.13 11:27 rstats: melt a list to a dataframe with ldply(l, ldply) http://bit.ly/1bDUj2D 12.03.13 10:28 git: merge single-file changes with git checkout --patch branchname filename http://bit.ly/1bG8mVm 12.07.13 13:04 macosx: use diskutil to erase a problematic drive http://bit.ly/1chiajF 12.11.13 15:02 python: install scipy w/ pip install conda && conda init && conda install scikit-learn http://bit.ly/1kAew9g via @teoliphant 12.18.13 11:45 macosx: get gdb working in mavericks w/ brew install homebrew/dupes/gdb + http://bit.ly/19SOvNn 12.18.13 13:12 macosx: add a user to a group with dseditgroup http://bit.ly/JImCBy 12.20.13 11:16 emacs: monitor local vars, breakpoints, watch statements, etc. with M-x gdb-many-windows http://bit.ly/JKXuJW 12.24.13 15:54 macosx: install xcode commandline tools with xcode-select --install http://bit.ly/1jFW18e 12.26.13 12:44 git: use git gc --aggressive to reduce repo size http://bit.ly/1ijcRrG 12.26.13 12:46 git: allow empty commit messages with git -a --allow-empty-message -m "" http://bit.ly/1ijdnpG 12.26.13 12:48 git: migrate from svn to git with git svn clone http://bit.ly/1ijdqlg 12.26.13 14:20 macosx: dump and diff system settings with defaults read / strings http://bit.ly/1gZI2Ia (h/t @mathias) 12.30.13 11:34 python: use the multiprocessing.dummy module for easy thread pool parallelism http://bit.ly/1gguGVj 01.04.14 20:35 macosx: how to run diskutil in single user mode http://bit.ly/1f4iYzG 01.05.14 13:19 macosx: reset a mac to factory settings http://bit.ly/KrKoBI 01.07.14 11:43 shell: use non-printable characters as arguments http://bit.ly/1faYiX0 01.08.14 13:16 networking: use tcpdump to montor http get and post traffic http://bit.ly/1afwzAv 01.13.14 12:18 macosx: hold option and click to jump to a position on the command line http://bit.ly/1dKftrC (h/t @blackjack75) 01.13.14 12:30 macosx: use ctrl-x ctrl-e to open the current command line in an editor http://bit.ly/1dKh68R 01.15.14 18:12 rstats: tips to customize almost all aspects of ggplot http://bit.ly/1dtV11T 01.20.14 16:55 rstats: use theme(legend.background=element_blank()) to remove legend backgrounds in ggplot2 01.21.14 15:16 mysql: dump a mysql table to a tsv with headers http://bit.ly/LCeVNA (h/t @dggoldst) 01.26.14 21:01 macosx: boot into recovery mode using cmd-r on startup 01.26.14 21:02 macosx: use fsck_hfs -frpy /dev/diskNsN to repair invalid node structure http://bit.ly/1f4SXM5 01.26.14 21:03 macosx: use rsync 3 to create a bootable backup http://bit.ly/1fgG7fY 01.26.14 21:05 macosx: use ditto to copy while preserving permissions, access times, resource forcks, etc. http://bit.ly/1f4TfTb 01.27.14 11:21 git: use git show REVISION:path/to/file to see previous version of a file http://bit.ly/1esqJJv 01.27.14 14:08 git: see the difference between two revisions with git diff rev1..rev2 file http://bit.ly/L3f4cw 01.31.14 11:09 awk: merge multiple files, removing headers, using awk FNR-1 *.tsv http://bit.ly/1lpJtCC (h/t @dggoldst) 01.31.14 14:18 python: handy tips for numpy users http://bit.ly/1fESK2O (h/t @hmason) 01.31.14 17:33 javascript: use sprintf.js for easy string formatting http://bit.ly/1lqsDU9 01.31.14 18:51 javascript: use moment.js for formatting dates http://bit.ly/1fiM61L (h/t @sztul) 02.01.14 21:18 macosx: reset account passwords and acls with cmd-r, resetpassword http://bit.ly/1n5707A 02.12.14 10:10 shell: use cmd | tar czvf -T - to create a tarball from a list of files on stdin http://bit.ly/1lCopWb 02.27.14 10:36 networking: tor and python for anonymous web crawling http://bit.ly/1fWy2tI (h/t @deanmalmgren) 02.28.14 09:56 shell: rename multiple files using sed-style patterns http://bit.ly/1evfZyD (h/t @dggoldst) 03.03.14 11:43 macosx: alfred cheatsheet http://bit.ly/1pVemPd 03.04.14 13:31 emacs: use C-u M-x shell to open multiple shells http://bit.ly/MLk85Y 03.05.14 08:52 iphoto: reset the face detection database w/ rm iPhoto\ Library/Database/apdb/{Faces,BigBlobs.apdb} 03.05.14 17:25 javascript: use encodeURIComponent instead of escape to handle unicode query parameters http://bit.ly/1caxTqV 03.09.14 12:42 bash: use type and type -a to view and list how commands are interpreted (h/t @fizziksgabe) 03.18.14 11:50 macosx: use unix find and test to locate resource forks http://bit.ly/1egLJqK 04.09.14 11:20 latex: embed fonts using acrobat preflight http://adobe.ly/1g7gPhS 04.15.14 12:21 shell: do an rsync "include only" copy of specific files http://bit.ly/1m8eVCz 04.30.14 13:22 javascript: use jquery.when to trigger after loading multiple files http://bit.ly/1hWNeI2 05.01.14 17:53 latex: embed all pdf fonts using preview.app with print -> save as pdf to new file (h/t @5harad @ssuri) 05.01.14 20:16 emacs: select a region and use C-x r t to prepend text to all lines http://bit.ly/1kubxzO 05.08.14 20:24 javascript: check for a touch screen with "ontouchstart" in document.documentElement http://bit.ly/RsF1Gf 05.09.14 13:52 linux: use lsblk to list dev ids for mountable disks http://bit.ly/1jauqWe 05.12.14 12:01 javascript: use window.history.pushState to modify the address bar url without relead http://bit.ly/1uUEL25 05.13.14 11:25 python: use pip freeze to list installed package versions http://bit.ly/1uZBE9a 05.15.14 14:47 javascript: a jquery hack to check if two array sets are equal http://bit.ly/1jMTF6h 05.20.14 20:05 macosx: use mdls to read photo metadata http://bit.ly/1jSVqtF 05.21.14 10:50 google: search by image on google images by simple drag and drop (h/t @dggoldst) 05.22.14 17:29 rstats: use colsplit to split a column by a delimiter http://bit.ly/1tqftat 06.12.14 14:25 hadoop: fix SCDynamicStore error on macosx with HADOOP_OPTS and PIG_OPTS http://bit.ly/1oTuGjk 06.12.14 16:29 bash: use :p to print/preview commands before executing http://bit.ly/1q8MhFN 06.13.14 09:08 shell: add syntax highlighting to less via vim http://bit.ly/1itBGgT 06.18.14 09:20 rstats: use detach to remove a package from the current workspace detach("package:plyr", unload=TRUE) http://stackoverflow.com/a/6979989/76259 06.24.14 11:26 rstats: overlay a histogram with empirical and normal density estimates in ggplot http://bit.ly/1o02FFu 07.29.14 11:12 python: use html.fromstring in the lxml package for fast webpage parsing http://bit.ly/1tnvCjk 07.30.14 10:38 shell: use watch to run and periodically monitor a process (h/t pablo) http://bit.ly/UBnlJE 08.18.14 16:17 rstats: normalize histograms with ggplot http://bit.ly/VA4D5z 08.21.14 11:21 git remove sensitive data from a git repo with filter-branch or bfg http://bit.ly/1oh0EBM 09.19.14 13:02 rstats: use tbl_df to create a dyplr-friendly table http://bit.ly/1BUfJmm (@dggoldst) 09.21.14 22:49 rstats: speed up logistic regression with aggregated counts using cbind http://bit.ly/1uuGiKf 10.07.14 10:29 git: rename the master branch in local and remote repos http://bit.ly/1ux1d1F 10.11.14 21:47 macosx: osx has built in wireless scanning, packet sniffing, and logging tools http://bit.ly/1nhFpWP 10.16.14 09:38 latex: use mathsmaller in the relsize package for resizing super/subscripts http://bit.ly/1ocuIp3 10.16.14 09:46 latex: a convenient table of all math fonts http://bit.ly/1ocvwuc 10.16.14 15:36 rstats: use aes_string with backticks to refer to columns with invalid chars http://bit.ly/1xWcEQb 10.19.14 23:10 emacs: use M-x set-buffer-file-coding-system unix to deal with ^M returns http://bit.ly/1urkYUu 10.19.14 23:11 emacs: replace carriage return newlines on a mac http://bit.ly/1vzKqvh 10.29.14 14:57 rstats: use the expression function to add latex-ish labels to ggplot http://bit.ly/1rAIrRm 11.05.14 11:27 latex: avoid bad url linebreaks with the hyphens option http://bit.ly/1uwckcC 11.14.14 11:42 rstats: draw arrows in ggplot with geom_line(arrow=arrow()) from the grid library http://bit.ly/11o0Mw0 11.24.14 13:17 macosx: use image capture to stop iphoto from opening when iphone plugged in http://bit.ly/1vG8yhD 12.17.14 17:20 macosx: various fixes for Mail.app problems http://bit.ly/1zuNQ4t 12.29.14 13:49 git: remove already pushed commits with git reset --hard, git push -f http://bit.ly/1rvtO8E 01.04.15 12:01 bash: capture command output and test status with PIPESTATUS http://bit.ly/1Bmdxou 01.08.15 22:02 rstats: use anti_join in dplyr to find unmatched records btwn two tables http://bit.ly/1yHJ4lq (h/t @ssuri) 01.09.15 11:54 rstats: read large files with fread in data.table http://bit.ly/14a8jiC (h/t @nee_daniel) 01.15.15 09:39 git: 25 tips for the intermediate git user http://bit.ly/1sCnWen 01.15.15 17:06 javascript: append /embedded/result to download jsfiddle code http://bit.ly/1y2RL8b 01.16.15 06:32 macosx: manage wireless connections on the command line with networksetup http://bit.ly/1AYfKFC 01.16.15 10:16 rstats: parallelize plyr with doMC via .parallel=T http://bit.ly/1y5uhPR 01.20.15 21:34 python: great web scraping tips, from concurrency to ajax http://bit.ly/1E0gbTn 01.20.15 22:11 git: a github cheatsheet hosted on github, naturally http://bit.ly/1CfzfuR 01.27.15 20:36 latex: count words in with texcount http://bit.ly/1ytMO3Y (h/t @arnabdotorg) 02.03.15 15:05 shell: a one-liner to see your most frequently used commands http://bit.ly/1Dutec2 02.03.15 15:16 rstats: data wrangling cheatsheet from @hadleywickham http://bit.ly/1zQhrb4 (h/t @solomonmg) 02.06.15 17:13 git: get the path of a file relative to the repo with git ls-tree http://bit.ly/1yRtPBC 02.06.15 17:14 git: use git rev-parse --show-toplevel to get the absolute path of the repo base http://bit.ly/1Ik1dL2 02.26.15 17:12 rstats: use variables within dplyr function calls (e.g., for column names) http://bit.ly/1Gy7oXf 03.05.15 15:33 rstats: use broom to get tidy dataframes summarizing models and predictions http://bit.ly/1FfnxzY 03.18.15 18:03 rstats: use predict(model, interval="confidence") to get confidence intervals on predictions http://bit.ly/1O7gTBW 04.07.15 17:04 linux: use lshw to get system hardware details http://bit.ly/1O4OE5Q 05.07.15 17:14 latex: use the footmisc package to comma separate multiple footnotes http://bit.ly/1F1PlKt 06.14.15 20:24 rstats: use V(g)$name to access node names with igraph http://bit.ly/1BcqlRk 06.30.15 11:29 rstats: use ggpairs from the GGally package for better pairwise plots http://stackoverflow.com/a/12047554 07.21.15 16:20 rstats: change a legend title with scale_...(name="new title") http://bit.ly/1Ih6p0E 08.07.15 09:12 rstats: reverse the order of a ggplot2 legend with scale(guide = guide_legend(reverse=TRUE)) http://bit.ly/1KUsfqO 08.07.15 09:15 rstats: modify ggplot2 legend titles with guide(fill=guide_legend(title="new title")) http://bit.ly/1KUsfqO 08.07.15 10:29 rstats: even better, change ggplot2 legend titles with labs(fill="new title") (h/t @0x00BAB10C) 08.07.15 12:44 latex: use the etoolbox package to remove first page permission blocks http://bit.ly/1Pb9xN3 08.27.15 09:59 rstats: hide all ticks, text, border, grid, etc in ggplot2 http://bit.ly/1LD2yhA 09.02.15 08:49 rstats: extract cv.glmnet coefficients with broom using tidy(cvfit$glmnet.fit) http://bit.ly/1Vw3Dtp 09.10.15 09:46 rstats: use update.packages(checkBuilt=T, ask=F) after upgrading to a new version of R http://bit.ly/1KasQBj 09.11.15 13:08 macosx: change the path screenshots are saved to with defaults write com.apple.screencapture location 11.02.15 12:30 rstats: use stat_ecdf for easy cumulative density plots http://bit.ly/1P1ETJ1 (h/t @dodger487) 11.02.15 12:41 rstats: dev version of dplyr allows for variable column names http://bit.ly/1Oj2oNC (h/t @romain_francois via @dggoldst) 11.23.15 12:22 windows: use vsdiffmerge to compare files in visual studio http://bit.ly/1TalO6j 12.02.15 20:04 python: use unicodedata.normalize for smart unicode to ascii translation (h/t @mikedewar) 12.03.15 10:06 python: use python-qt4 as a quick hack for scraping javascript pages http://bit.ly/21yaoPd (h/t @yhathq) 01.06.16 14:17 bash: use ccrypt for easy command line encryption (h/t @dggoldst) 01.14.16 11:15 rstats: use fread from data.tables or read_delim from readr for fast tsv/csv parsing http://stackoverflow.com/a/1728422/76259 01.18.16 21:53 rstats: use sessionInfo to list loaded packages and version http://bit.ly/1OtkJoR 01.19.16 09:47 rstats: use round_date from lubridate to round to the nearest day, month, etc http://bit.ly/1OucWHp 01.19.16 09:48 rstats: rstudio ide cheatsheet and shortcuts http://bit.ly/1nioODH 01.20.16 10:55 rstats: use all.equal or identical to compare dataframes http://bit.ly/1T4Xbde 01.20.16 13:30 rstats: plot density and cdf on the same plot with ggplot2 http://bit.ly/1KrlHhj 01.20.16 17:52 rstats: see object memory usage sort(sapply(ls(), function(x) format(object.size(get(x)), unit="auto"))) http://bit.ly/20fyQmX 01.28.16 10:14 rstats: use geom_density(y=..count..) for a smoothed histogram in ggplot2 http://bit.ly/20uZB78 01.29.16 10:52 rstats: use gc() to force garbage collection and save some memory http://bit.ly/1Uvgmve 02.03.16 13:56 git: how to undo almost anything http://bit.ly/1PURHlL 02.03.16 16:23 shell: list files recursively by modification time find . -type f -exec ls -1rtlh "{}" +; http://bit.ly/1nHm56j 02.19.16 11:34 python: parse a mix of unicode and other types with isinstance basestring http://bit.ly/1Uckger 02.19.16 20:46 emacs: use C-M-\ indent-region to move blocks of code http://bit.ly/213Yejh 02.22.16 10:19 emacs: use C-c < to unindent and C-c > to indent in python mode http://bit.ly/1RihmlE 02.24.16 15:32 git: use git credential.helper store to save an https password http://bit.ly/1p5ieRG 04.05.16 09:24 shell: use tidy -i or xmllint to indent html http://bit.ly/1Tzd7oU http://bit.ly/1Tzda43 04.07.16 19:18 imagemagick: autocrop an image with convert infile -fuzz 1% -trim +repage outfile http://bit.ly/1PXj08x 05.17.16 13:12 emacs: use ctrl-q ctrl-m for literal ^M 05.31.16 09:37 shell: use iconv to convert between utf-16 and utf-8 encodings http://bit.ly/1XbwYgD 06.16.16 14:31 git: checkout one file from a remote branch http://bit.ly/1UylbGz 06.16.16 14:42 git: use git filter-branch to remove a large file from all commits http://bit.ly/1rsHC4j 06.16.16 14:48 git: clean up backups after a filter-branch http://bit.ly/1UynM3g 06.28.16 20:31 latex: use the draftwatermark package for easy watermarking http://bit.ly/28Z5gME 07.05.16 18:04 rstats: a simple hack to download and unzip online data in r http://bit.ly/29MjMJN 07.12.16 08:54 rstats: read geojson with readOGR("foo.json", "OGRGeoJSON") http://bit.ly/29tkX3T 07.29.16 09:12 rstats: use display.brewer.all() from RColorBrewer to see all available palettes for scale_color_discrete (h/t @yeedle) 07.29.16 13:43 imagemagick: convenient options for animated gifs http://bit.ly/2aQ4412 08.02.16 10:13 rstats: a memory efficient way to convert a data frame to a sparse matrix http://bit.ly/2aMC8yE 08.02.16 13:07 rstats: use scale_x_discrete(limits=c(...), labels=c(...)) to customize the order and labels of factors http://bit.ly/2b0bRsR 08.04.16 09:43 rstats: fit per-group models with dplyr and broom group_by(df, var) %>% do(fit=lm()) %>% tidy(fit) http://bit.ly/2aVhuwN 08.04.16 09:45 rstats: use relevel to set the default reference level for factors in models http://bit.ly/2aVhxZp 08.04.16 09:49 rstats: use rbindlist to quickly combine large data frames http://bit.ly/2aVikcX 08.04.16 09:52 rstats: use expand_limits to change default ranges on factors and colors http://bit.ly/2aVjMf5 08.04.16 09:54 rstats: a regex to extract factor variable names and levels from tidy model data frames http://bit.ly/2aVjDbI 08.18.16 15:25 mturk: use boto to extract results / answers http://bit.ly/2aZYIU9 08.29.16 14:14 rstats: use type_convert in readr or type.convert from utils to guess column types http://bit.ly/2bvUB0E http://bit.ly/2bvUUJ2 08.30.16 21:21 macosx: use pip --ignore-installed six to get around OSErrors (e.g., when upgrading numpy) http://bit.ly/2bAlDp7 08.30.16 21:36 python: python -m site shows the package search path 09.06.16 12:16 git: search code history with git grep $(git rev-list --all) http://bit.ly/2bVvbda 09.06.16 14:47 rstats: use labeller = label_both to show facet variable names along with levels http://bit.ly/2bQVKg3 09.06.16 21:35 shell: your local weather report, ascii style with curl wttr.in/newyork 09.14.16 20:19 rstats: use the directlabels package to easily label things on plots http://bit.ly/2cyyF2J 09.14.16 21:18 rstats: use coord_cartesian(ylim=...) instead of scale_y_continuous(lim=...) with geom_smooth to avoid throwing out data http://bit.ly/2cbDT8L 09.22.16 14:49 rstats: use group_by_(.dots=col_names) to group by a vector of strings containing column names w/ dplyr http://bit.ly/2cp07Q0 10.06.16 11:53 rstats: use the zoo package for (irregular) time series http://bit.ly/2d66xXG 10.28.16 17:45 rstats: simple ways to sum across rows or columns with dplyr http://bit.ly/2e5QDwS 11.03.16 08:12 rstats: new ways to hide part of a legend: scale_size(guide = F) or guides(size = F) http://bit.ly/2eXS1CI 11.08.16 09:48 latex: use detex doc.tex | wc -w or texcount doc.tex to count words in a rendered document http://bit.ly/2eIRK65 11.14.16 10:15 macosx: set java environment using export JAVA_HOME=`/usr/libexec/java_home` http://bit.ly/2eXuGRf 12.05.16 13:33 rstats: use latex2exp to get latex in plot lables http://bit.ly/2g1bZOA 12.05.16 13:35 rstats: use tikzDevice to get nicely rendered latex in plots http://bit.ly/2g17qE1 12.11.16 19:47 macosx: use the built-in caffeinate command to keep a machine awake http://bit.ly/2hjCSNu 12.20.16 17:05 latex: convert bibtex to endnote with this java tool http://bit.ly/2hR2nUp 12.20.16 17:06 bibtex: use bibutils to convert between reference formats http://bit.ly/2hQSZ33 12.21.16 18:25 mturk: submit hitId and assignmentId on external hits http://amzn.to/2hblrhx 12.26.16 12:09 rstats: use ggrepel for intelligent labelling of points on plots http://bit.ly/2i81HKy (h/t @dggoldst) 12.26.16 15:12 rstats: a tour of dplyr 0.5 coalesce, mutate/summarize_{if/at/each} http://bit.ly/2i8kJQT 01.06.17 13:44 shell: use lpstat -p -d to list available printer device names for lpr http://superuser.com/a/177461 01.11.17 11:04 rstats: ctrl-shift-p in the source window runs the current region http://bit.ly/2jvCJnR 01.11.17 12:21 rstats: use coalesce(x, 0) to force all NAs to 0 01.24.17 09:08 rstats: use ggplot's coord_map for different geographic projections, and coord_quickmap for easy defaults http://bit.ly/2jNcydG 01.24.17 09:12 macosx: fix ssh passphrase w/ Host * UseKeychain yes in ~/.ssh/config file http://bit.ly/2jMZEw9 01.24.17 09:18 rstats: use ggplot's stat_summary for easy plots of summary statistics with different geoms http://bit.ly/2jN5kqc 01.26.17 17:40 rstats: use ctrl/cmd-up to search command history in rstudio 02.01.17 19:45 juypter: use cmd-shift-p to see keyboard shortcuts http://bit.ly/2kXE5IL 02.01.17 21:29 latex: use sans serif fonts with \renewcommand{\familydefault}{\sfdefault} http://bit.ly/2ksryAc 02.02.17 06:09 latex: a nasy to use makefile for compiling documents http://bit.ly/2kZousa 02.02.17 06:15 rstats: a minimal make file for latex documents and figures http://bit.ly/2kZuPUB 02.03.17 14:07 rstats: use cut_width, cut_number, and cut_interval for easy binning http://bit.ly/2kavwwM 02.03.17 14:08 rstats: use geom_freqpoly for histograms with lines instead of bars http://bit.ly/2kavJjy 02.09.17 20:17 git: overwrite your Github history with git push origin --force --all http://bit.ly/2ky4pf1 02.09.17 20:32 rstats: use files %>% map(read_csv) %>% reduce(rbind) to read multiple files into a dataframe http://bit.ly/2kyah8d 02.09.17 21:27 rstats: better yet, use map_df(files, read_csv) to read multiple files (h/t @hadleywickham) 02.10.17 20:40 search: use the AROUND keyword to find documents with words near each other http://bit.ly/2kd9ScN (h/t @dggoldst) 02.11.17 11:47 search: advanced search operators http://bit.ly/2kwUFz9 http://bit.ly/2kwVcB9 (h/t @dggoldst) 02.25.17 06:30 git: use git log --diff-filter=D --summary to find deleted files http://bit.ly/2mhsNno 05.03.17 13:52 rstats: cowplot helps with publication-ready ggplot2 http://bit.ly/2pIsJxF (h/t @stefanmherzog) 05.15.17 13:19 rstats: a hack to set custom factor orderings within each facet of a plot http://bit.ly/2rim3Uw 05.15.17 13:24 rstats: an alternative approach to ordering factors within facets in ggplot2 http://bit.ly/2riAatf 05.15.17 13:59 rstats: flatten each element of a list column to its own row with unnest http://bit.ly/2riSMcE 06.19.17 10:42 shell: a few tips for a first time shell setup http://bit.ly/2tk3kKl 06.20.17 10:48 git: a set of useful .gitattributes files for different project types http://bit.ly/2rR8ECL 06.20.17 10:50 git: set .gitattributes to handle newlines and carriage returns across platforms http://bit.ly/2rRrSbA 06.29.17 16:40 rstats: all the ways to change ggplot2 legend labels http://bit.ly/2uoFOeI 06.29.17 16:44 rstats: use alt-shift-k for a list of rstudio keyboard shortcuts (h/t @jenitive_case, @hadleywickham) 07.18.17 10:46 rstats: control the number of columns shown from a tibble with options(tibble.width = Inf) http://bit.ly/2uEQHNZ 07.18.17 10:50 rstats: use df %>% print(n = k, width = Inf) to print k rows of a tibble and all columns 07.21.17 13:14 rstats: use group_by_at(df, vars(col1:colN)) to group by a range of co columns http://bit.ly/2uHDMu8 07.21.17 13:18 rstats: group by all column but one with dplyr http://bit.ly/2uHEU0S 07.26.17 18:09 rstats: use tidy evaluation to create functions that use bare column names http://bit.ly/2tEdRzM 08.01.17 20:52 rstats: put multiple ggplot graphs in one figure w/ grid ggpubr, cowplot, or gridExtra http://bit.ly/2wjCouM 08.09.17 09:50 git: the gittutorial manpage http://bit.ly/2wIbLA2 (h/t @dggoldst) 08.16.17 12:58 latex: some nice todonotes aliases to manage latex documents http://bit.ly/2waLrlC 08.29.17 13:23 git: use a simple script to count lines of code by language http://bit.ly/2wGAfxh 09.12.17 13:03 rstats: rwaffle, a package for making icon arrays / info grids http://bit.ly/2eTA2w2 09.18.17 18:22 shell: lolcat, a rainbow-flavored version of cat http://bit.ly/2hdeTgZ (h/t dean) 09.20.17 14:57 rstats: take advantage of caching and dependencies in rmarkdown, similar to makefiles http://bit.ly/2xnuGDj (h/t @dggoldst) 09.28.17 13:33 shell: use units to convert between or compute with different physical units http://bit.ly/2wXIgP9 (h/t @dggoldst) 10.19.17 10:54 rstats: use pull to cleanly extract one tibble column as a vector http://bit.ly/2zmshaj 11.02.17 11:41 rstats: use predict(model, new_data, re.form=NA) to predict from fixed effects only in an hlm http://bit.ly/2ipbwo2 11.07.17 09:59 git: move a directory from one branch to another http://bit.ly/2iBlgM1 11.09.17 16:00 rstats: format axes breaks with exponents in ggplot2 http://bit.ly/2zwB8aI 11.22.17 21:39 rstats: use display.brewer.all() to see all palettes and brewer.pal.info for a data frame of options http://bit.ly/2B4vPyK 12.11.17 10:06 rstats: use char2dms to convert latitude / longitude strings to decimal format http://bit.ly/2AboKvX 12.11.17 11:28 rstats: use deparse(substitute(arg)) to get the name of a function argument https://stackoverflow.com/a/14577878/76259 01.04.18 13:12 rstats: use geom_lollipop and geom_dumbbell for easy dot plots http://bit.ly/2qmNNfp 01.04.18 13:18 rstats: try theme_ipsum for ggplot http://bit.ly/2CredxX 01.04.18 13:20 rstats: try geom_quasirandom or geom_beeswarm for column / violion scatter plots http://bit.ly/2lUsJIr 02.27.18 15:59 rstats: use na.locf from the zoo package to carry forward observations http://bit.ly/2CnwcsI 02.28.18 10:47 rstats: quick hack for per-group summaries df %>% group_by(x) %>% do(tidy(.$y)) (h/t @stefanmherzog) 04.16.18 16:26 rstats: use grid.arrange or arrangeGrob to make multiple ggplot plots in one http://bit.ly/2JOLZkY 05.01.18 10:23 rstats: make a quick normal density plot with shaded areas using stat_function http://bit.ly/2vZmCtW 05.22.18 17:19 rstats: use patchwork to combine separate ggplots into one figure http://bit.ly/2KJX1Ym 06.01.18 13:25 emacs: use meta-y to step back through the kill ring (h/t @loafingsohard) 06.06.18 11:39 rstats: use the conflicted package to avoid namespace collisions http://bit.ly/2swEaJF (h/t @dggoldst, @EJSbrocco) 06.08.18 15:05 python: use doctest to define and run tests in docstrings http://bit.ly/2Hx2Nuh 06.13.18 11:23 rstats: use outlier.shape=NA in geom_boxplot to remove outliers http://bit.ly/2HOts5U 06.22.18 14:21 rstats: use formula syntax, broom, and group by for tidy t-tests http://bit.ly/2IgUN0U 06.28.18 10:15 rstats: add NULL to the end of ggplot chains for easy commenting (h/t @wytham88) 06.28.18 10:16 rstats: add identity() to the end of a dplyr/magrittr chain for easy commenting (h/t @bearloga) 07.06.18 08:57 python: use a config.py file or os.environ.get to store and load private variables (e.g., api keys) http://bit.ly/2KU999J 07.06.18 13:27 rstats: use mapview::mapshot to save a leaflet map to html or png http://bit.ly/2KVrrao 07.11.18 17:15 network: use nmap localhost to see open ports and netstat to see current connections 07.23.18 15:35 rstats: try glmnet, SparseM::slm, or MatrixModels:::lm.fit.sparsese for sparse linear models http://bit.ly/2NAlC3d 07.24.18 15:48 rstats: use dplyr's group_indicies function to generate a unique id for each group http://bit.ly/2NI60uv 07.24.18 17:32 rstats: many ways to compute AUC in R http://bit.ly/2NHdzl6 (h/t @rbloggers) 07.24.18 17:35 sql: an efficient approximation to accurately compute small geographic distances on a sphere (e.g., the earth) http://bit.ly/2NHxhNB (h/t @jonisalonen) 07.24.18 17:37 rstats: a quick, vectorized pairwise distance function that beats the pdist package http://bit.ly/2NIx1y4 (h/t @rbloggers) 07.25.18 16:18 html: use @fontawesome for open source and free icons http://bit.ly/2NHZDHI 07.31.18 09:44 rstats: a compact reference for passing function arguments with tidy evaluation (quo, enquo, !!, etc.) from @edwin_thoen http://bit.ly/2K94Q97 08.03.18 10:30 rstats: change legend labels in leaflet with addLegend(labelFormat(transform = function(x) ...) http://bit.ly/2Kp0F9i 08.07.18 09:51 rstats: use speedglm to fit large linear models http://bit.ly/2OjsiDn (h/t @dean_c_knox) 08.09.18 13:23 linux: use lsof -i tcp: to see what processes are listening on a port http://bit.ly/2OiZ7Qw 08.13.18 11:35 ggplot: use gghighlight by @yutannihilat_en for easy annotations and comparisons on plots http://bit.ly/2OtQzGP 09.05.18 16:24 rstats: use installed.packages() to get a list of install packages http://bit.ly/2NQkyJb 09.15.18 17:39 rstats: easily read multiple files into one tidy dataframe with fs and purr http://bit.ly/2xfNUKN (h/t @zevross) 09.18.18 10:10 latex: use the framed package to put borders around figures http://bit.ly/2PJuLYc 09.20.18 10:02 shell: use git diff --no-index --color-words to see word-level difference between files http://bit.ly/2DggSj0 09.21.18 08:56 latex: use the enumitem package to control spacing in lists http://bit.ly/2xHImrC 10.04.18 09:53 git: cache https credentials for mac, windows, or linux http://bit.ly/2E8VxIT 10.04.18 14:27 javascript: difference between double and trip equals operators (== vs ===) http://bit.ly/2BWnfFP 10.13.18 09:46 rstats: use iconv(s, "UTF-8", "latin1", sub = "") to drop problematic characters http://bit.ly/2yfS1qE 10.15.18 17:56 latex: use \setbeamercovered{transparent} and \setbeamercovered{invisible} to change visibility of covered items in beamer http://bit.ly/2J2pJnO 10.23.18 14:10 rstats: to control output resolution in gganimate use animate( ..., width= , height= , res= ) http://bit.ly/2NY55pH 10.25.18 16:34 shell: use tail -r to reverse the lines of a file http://bit.ly/2RitkRz 11.14.18 17:42 rstats: spread a dataframe from long to wide when you have multiple values http://bit.ly/2Dnz34P (from @kjhealy) 11.19.18 13:23 rstats: quick and easy lollipop charts in ggplot with geom_point and geom_segment http://bit.ly/2S8fLof 11.20.18 11:02 rstats: be careful of dropped zero counts with dplyr http://bit.ly/2S7j13b from @jkhealy 11.20.18 11:04 rstats: be careful of dropped zero counts with dplyr http://bit.ly/2S7j13b from @kjhealy 12.10.18 11:18 latex: use \usepackage[none]{hyphenat} to prevent hyphenation http://bit.ly/2SBUjba 12.10.18 11:18 latex: use p{width} for word wrap in the tabular environemnt http://bit.ly/2C3cOjr 12.15.18 08:52 emacs: use newlines in a find and replace with C-q C-j http://bit.ly/2EjXpgd 01.17.19 10:51 emacs: upgrade all elpa packages with M-x list-packages, U, x http://bit.ly/2RBayt2 02.06.19 10:55 rstats: tutorial on using docker for R via @RLangTip http://bit.ly/2SgAQBl 02.07.19 11:32 rstats: download a zip file, extract and read a file within it http://bit.ly/2UNOite 02.14.19 18:36 markdown: pandoc will pass latex through to final document http://bit.ly/2N454BJ 03.27.19 13:53 latex: use the makecell package for easy line breaks / new lines within a table http://bit.ly/2UY0Z5h 03.30.19 11:42 use theme(axis.title.x = element_blank()) to remove space used for a blank x axis http://bit.ly/2V4ICvf 03.31.19 19:24 latex: single space an itemize list with \itemsep0em (h/t @dggoldst) 07.26.19 09:31 rstats: some code for saving lightweight version of fitted models http://bit.ly/2YjGXTz 08.07.19 16:20 python: start a lightweight web server with python -m http.server 8000 http://bit.ly/2Kmmfif (h/t @yeaseulkim) 08.07.19 16:24 rstats: add a linebreak after varname <- for easy commenting http://bit.ly/2ZGC3Br (h/t @BenjaminWolfe) 08.27.19 14:13 rstats: set the default level of a factor using fct_relevel http://bit.ly/324o35p 09.20.19 19:07 shell: split a multi-page pdf into separate jpgs convert x.pdf x-%04d.jpg http://bit.ly/2V4YDCe 09.23.19 11:41 latex: watermark along a left/right margin http://bit.ly/2m8UnUW 10.02.19 13:27 rstats: use ggstatplot for easy statistical plots and reporting http://bit.ly/2mXfxGk 10.08.19 13:56 rstats: knit a regular R script to html with knitr::stitch("script.R") http://bit.ly/2IxcT1N 10.19.19 06:07 shell: find symbolic links with find . -type -ls or ls -lR | grep ^l http://bit.ly/31A259S 11.02.19 11:48 latex: set frame counter manually to avoid counting backup slides in beamer http://bit.ly/2JM9igW 11.14.19 15:45 powerpoint: jump directly to a slide by typing its number + enter while presenting (h/t @dggoldst) 11.25.19 09:16 shell: convert a movie to an animated gif with ffmpeg and imagemagick http://bit.ly/2QRs6zA 12.19.19 16:03 latex: use latexpand to flatten a LaTeX project into one file http://bit.ly/2S9XFFj 03.12.20 20:11 rstats: create all pairwise combinations of rows in a dataframe with full_join and a dummy column http://bit.ly/38LLvav 04.20.20 20:05 shell: use dplyr-cli for dplyr syntax on the command line https://bit.ly/34Rp2Z5 06.19.20 11:31 latex: use the fullcite or bibentry commands to insert a reference inline https://bit.ly/2Ndkwfz 06.19.20 13:32 latex: use the captionof command to caption a non-floating table or figure https://bit.ly/3fDkmKH 06.19.20 13:34 latex: use the tabulary package for tables with well-balanced column widths and row heights https://bit.ly/2YkVzW9 08.03.20 20:42 rstats: use the layer_scales function to get the range of a ggplot x and y axes https://bit.ly/2DgmEls 08.03.20 20:43 rstats: see the expansion function for ggplot2 default padding of axis ranges https://bit.ly/3k2wfgl 08.05.20 11:23 rstats: download, unzip, and read in a file with tempfile and unz https://bit.ly/3i8LbaS 08.21.20 14:27 shell: speed test from the command line https://bit.ly/2YoYjBb 08.21.20 15:04 shell: command line speed test with fast.com https://bit.ly/2FMAmgP 09.04.20 13:57 rstats: use drop_na(col_names) to drop any rows with NAs in given columns 10.21.20 13:34 vsc: format selections w/ cmd-k cmd-f, doc with shift-opt-f https://bit.ly/3jgEJ1x 12.08.20 10:58 git: visualize graph of branch topology w/ git log --graph --decorate --oneline https://bit.ly/3oxEdPL 01.20.21 21:59 shell: use unidecode to convert unicode characters to ascii equivalents https://bit.ly/392JSZt 02.21.21 10:14 rstats: use tribble for easy row-wise creation of tibbles and data frames https://bit.ly/2OUsL4h 04.19.21 09:09 latex: write inline markdown in latex with the markdown package https://bit.ly/3x9JbaP 04.21.21 14:02 macosx: use command-option-h to hide all windows other than the currently focused one https://superuser.com/a/504418 06.09.21 20:04 shell: speed up or slow down a video using complex filters in ffmpeg https://bit.ly/3va5KK0 09.08.21 13:14 rstats: use clip="off" in coord_cartesian and friends to annotate outside of axis regions https://bit.ly/2X4N4k1 09.09.21 09:27 latex: use the trim and clip arguments to includegraphics to crop images inline https://bit.ly/2VqObtq 09.13.21 21:07 latex: use \looseness=-1 to decrease the space between words in a paragraph 10.06.21 14:52 latex: use sidewaysfigure from the rotating package to get a fullpage landscape figure, but omit the [th] placement suggestions https://bit.ly/3Ahul2f 11.04.21 15:36 shell: tips for making high-quality gifs from mp4, mov, etc https://bit.ly/3COBJEb 12.02.21 18:26 macosx: do a screen recording with internal audio using black hole virtual driver https://bit.ly/3DcTIUk 12.21.21 12:40 git: a one-liner to recover all staged or unstaged deleted files https://bit.ly/3Ek6pxb 01.05.22 12:18 macosx: change the frequency of auto-update checks https://bit.ly/3zBI9Gc 01.11.22 11:20 rstats: install r-friendly gfortran, edit .Renviron for binary path if needed https://bit.ly/34I3gLx, more here: https://bit.ly/3zVJ83V 01.14.22 11:08 rstats: set OBJCXX=clang++ in ~/.R/Makevars on newer Macs for e.g., systemfonts https://bit.ly/3qs9QhH 01.27.22 19:45 shell: recursively find recent files w/ find . -type f -print0 | xargs -0 ls -tl https://bit.ly/3u8cYl0 02.09.22 10:43 shell: use sed or awk to print lines after a regex match https://bit.ly/3LlggYa 04.27.22 17:30 git: modify the most recent commit to a repo with git commit --amend https://bit.ly/3OJ1FYg 07.11.22 12:29 rstats: use locale = locale(encoding="Windows-1252") in read_csv for funky encodings https://bit.ly/3OYL02R 09.19.22 09:10 python: install packages from jupyter w/ !{sys.executable} -m pip install pkgname https://bit.ly/3LnOwm8 11.08.22 21:38 rstats: use the optimx package to avoid singular fits with lmer https://bit.ly/3DKFvA8 11.30.22 14:41 rstats: set explicit configure.args to install the sf package with proj and sqlite3 dependencies https://bit.ly/3ESxAl6 12.07.22 11:42 safari: easily get a list of all open tabs in desktop or mobile safari https://bit.ly/3Y6yVNI 04.15.23 14:53 shell: use ffmpeg to convert an m3u8 stream into an mp4 https://bit.ly/41O06yf 06.16.23 10:53 rstats: use ctrl-shift-m in rstudio for a shortcut to the pipe operator (h/t @elliotpickens)