- Install gpg, e.g.,
sudo port install gnupg
- Create a public/private key for yourself, e.g.,
gpg --gen-key
(you will have to answer some questions, I used 'knoto' as my comment - Encrypt a file, e.g.,
gpg -e -r knoto myfile.foo
(createsmyfile.foo.gpg
that can only be decrypted by knoto).
A repository of notes; by noto, for noto. Made public so noto can read it from anywhere. It won't make any sense to you.
Wednesday, May 9, 2012
Using GnuPG (gpg) for simple file encryption
How to use GnuPG for simple cases.
Tuesday, March 20, 2012
vim editing a remote file
Using
You may have to re-enter your password each time you save the file. From http://tipotheday.com/2008/06/08/editing-remote-files-with-vim-and-scp
scp
:
vim scp://keith@linux.cs.wmu.edu//home/keith/my.file
You may have to re-enter your password each time you save the file. From http://tipotheday.com/2008/06/08/editing-remote-files-with-vim-and-scp
Thursday, February 2, 2012
Aggregate functions in LaTeX
Friday, January 13, 2012
Setting up ssh/http port mapping on a Mac using Airport (Extreme)
- Find your computer's MAC address
- Airport utility
- Advanced section
- Logging & statistics tab
- Click on "Logs & statistics" button
- DHCP clients section
- Ensure that DHCP IP address stays the same.
- Airport utility
- Internet section
- DHCP
- Add a DHCP reservation
- Description: e.g., Norple@10.0.1.2
- Reserve by MAC (not client—it's not working for me)
- I used 10.0.1.2, a fine IP address indeed
- Set up port services
- Airport utility
- Advanced
- Port Mapping
- Add:
- SSH (choose nonstandard public port, like 2319, private can be 22)
- Person web sharing
- Others...?
- Update Airport so that it shuts down and restarts
- Set up web and file sharing on your computer
- System preferences
- Sharing
- Check remote login, web sharing, whatever you want.
Thursday, December 15, 2011
Combining Multiple PDF files into one
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf source1.pdf source2.pdf source3.pdf
Source:http://hints.macworld.com/article.php?story=2003083122212228.
Friday, September 30, 2011
Back-up DVDs from a MacOS command line
How to backup DVDs (this approach will not overcome copy protection--because of the ripping process).
Prereq:
Install dvdbackup
from http://dvdbackup.sourceforge.net
. Note that this requires libraries (i) libdvdread
and (possibly, ii) libdvdcss
. Download and install the libraries, then dvdbackup
(all are ./configure,make,sudo make install). Additional note: I installed libdvdread via mac ports, but dvdbackup
failed to configure because it required a different version. I then downloaded and installed version 0.9.7 separately, then ./configure worked (I also downloaded and installed libdvdcss--not sure if that matters.)
To backup a DVD:
-
dvdbackup -v -i /dev/disk1 -n NAME -M
where /dev/disk1 should be replaced with the device currently associated with the inserted disc, and NAME is whatever name you want to assign to the project. It turns out, the -n option is necessary. Without more options,dvdbackup
creates a similarly-named directory and writes the files there (the-v
option is just for verbosity--usedvdbackup --help
) -
hdiutil makehybrid -udf -o NAME.iso path-to-FOLDER
where NAME is again up to you, but path-to-FOLDER must contain the VIDEO_TS directory created by dvdbackup (it must not be the VIDEO_TS directory itself). Typically, this will be the directory created bydvdbackup
. - Burn the image with
hdiutil burn NAME.iso
This, apparently, finds your DVD device, writes and ejects it.
Thursday, August 4, 2011
auto-indent an entire source code file in VI (vim, gvim)
gg=G
=
, the indent command can take motions. So, gg
to get the start of the file, =
to indent, G
to the end of the file, gg=G
.http://stackoverflow.com/questions/506075/how-do-i-fix-the-indentation-of-an-entire-file-in-vi
Subscribe to:
Posts (Atom)