Using a + in an email address

If you take an email address like my iCloud account, it’s krypted@me.com. If I take the username and add a + at the end I can then type some characters and put it all in front of the @ and domain name then the mail will still come to me. So, let’s say I use it to create an AppleID for an APNS certificate. That would be: krypted+apns@mac.com Or iTunes: krypted+itunes@mac.com Or iPhone1 (or these days iPad1): krypted+ipad1@mac.com The only gotcha is that occasionally you’ll run into some field on a webpage that has input validation for non alpha-numeric characters. Shouldn’t be the case, but it comes up from time to time. I use this a lot. For example, rather than use my email w/ my credit card company, I can use krypted+SOMECOMPANY@me.com and then I can create filters in Mail a little more easily for mail that comes from them. The best part about that is that it then shows me really easily who is selling my information that shouldn’t. For example, you’d think SOMECOMPANY gets enough $ out of me as a paying customer, but apparently not because they’ve sold my email address to at least 3 or 4 companies.

The basics of cron

 The cron command has officially been deprecated in Mac OS X, but still functions if called upon. cron starts a process that executes commands at specified dates and times. Regularly scheduled commands can be specified according to instructions found in the crontab files in the directory /var/spool/cron/crontabs. Users can submit their own crontab files via the crontab command.  Crontab copies the specified file or standard input if no file is specified, into a directory that holds all users’ crontabs.  crontab options:
  • The -e option edits a copy of the current users’ crontab file or creates an empty file to edit if crontab does not exist.
  • The-r option removes a user’s crontab from the crontab directory.
  • The -l options lists the crontab file for the invoking user.
A crontab file consists of lines of six fields each.The fields are separated by spaces or tabs. The first five are integers that specify the following (in order):
  • minute (0-59)
  • hour (0-23)
  • day of the month (1-31)
  • month of the year (1-12)
  • day of the week (0-6 with 0=Sunday)
Each of these patterns may be either an asterisk (meaning all valid values) or a list of elements separated by commas. An element is either a number or two numbers separated by a minus sign ( meaning an inclusive range). Notice the time is in 24 hour format, 0 is midnight and 13 is one in the afternoon.  The * wildcard can be used to run on every instance of a given object. The sixth field of a line in a crontab file is a string to be executed by the shell at the specified times by the first fife fields. A percent character in this field (unless escaped by ) is translated to a newline character. Only the first line (up to a % or end of line) of the command field is executed by the shell. The other lines are made available to the command as standard input. Any line beginning with a # is a comment and is ignored.

vnode

The vnode table represents all file activity in UNIX. There is a unique vnode allocated in the vnode table for each active file, each current directory, each mounted-on file, text file, and the root.  To see the number of vnodes available in Mac OS X, look to sysctl for the kern.maxvnodes variable using something similar to the following command: sysctl -A | grep vnode

The Basics of pico (or nano)

At your Unix shell prompt, type: pico filename Replace filename with the name of the file you want to create or edit. For example, to create a file and name it indiana.txt, type: pico charles.txt If the file already exits, Pico opens it for you to edit. If it doesn’t exist yet, Pico creates it and places you in an editing buffer. Pico displays a menu bar of commonly-used commands at the bottom of the screen. Pico accepts commands from your keyboard but not from your mouse. To insert text into your Pico editing screen at the cursor, just begin typing. Pico inserts the text to the left of the cursor, moving any existing text along to the right. Each time the cursor reaches the end of a line, Pico’s word wrap feature automatically moves it to the beginning of the next line. (Also see “Justify.”) To move the cursor, use the arrow keys or use CTRL/f (forward), CTRL/b (back), CTRL/n (next line), CTRL/p (previous line). See the “Command overview” for more cursor movement commands. To delete the character to the left of the cursor, press BACKSPACE, DELETE, or CTRL/h. To delete the character highlighted by the cursor, press CTRL/d. To delete the current line, press CTRL/k. To save your edited file to disk, press CTRL/o. Pico displays the current filename. (To save the file under a different name, delete the filename that Pico displays and type a new one.) Press RETURN. To exit Pico, press CTRL/x. If you have made any changes since the last save, Pico asks whether to save them. Type y (yes) or n (no). If you type y, Pico displays the filename. (To save the edited file under a different name, delete the filename and type a new one.) Press ENTER. Pico lets you search forward from the current cursor position for any text string you specify. Press CTRL/w (for whereis) to invoke the search. Pico prompts you for a search term. To begin searching, type the text you’re looking for and press RETURN. Pico moves the cursor to the first instance of the text string you entered. You can find additional occurrences by pressing CTRL/w again. As you type, Pico’s word wrap automatically begins a new line when needed. However, when you edit existing text, you may create text lines that are either too short or too long. To re-wrap or “justify” a paragraph, move the cursor to that paragraph and press CTRL/j. To undo this action and restore the paragraph to its original condition, press CTRL/u. You can cut and paste text lines with Pico. Place the cursor on the first text line you wish to cut and press CTRL/k to remove it. (To cut and paste two or more consecutive text lines, press CTRL/k until all the text lines are removed.) You can now move the cursor to the location where you want to paste the text. Press CTRL/u. Pico pastes the text back into the file at the new cursor position. You can also cut and paste text blocks:    1. Move the cursor over the first character of the text you want to remove.    2. Press CTRL/^ to “set the mark.”    3. Use the arrow keys to highlight the text you wish to cut.    4. Press CTRL/k to cut the text. (Be sure you got all of the text you wanted, including the last character.)    5. Move the cursor to the place where you want to insert the text.    6. Press CTRL/u to paste the text into the new position. To insert the contents of an existing file at the cursor location, press Ctrl/r. Pico prompts you for a filename. You can either type the filename and press Return, or press Ctrl/t to select from a list of available files. Pico enters the File Browser, which displays a list of the files in your current working directory. Use the arrow keys to highlight the file you wish to insert and press Return. Select the parent directory (..) to move “up” the directory tree. Select a subdirectory to move “down” the directory tree. Besides inserting text, you can use the File Browser to rename, delete, or copy any file, even a file in another directory. To exit the File Browser, press e. To use the spell checker, press CTRL/t. When Pico discovers a word it does not recognize, it highlights the word and prompts you to enter a replacement. You can either type a replacement or press RETURN to keep the original word. Pico then continues to the next misspelled word. When Pico has checked your entire document, it returns the cursor to its original position. If your Pico session crashes, Pico attempts to save a copy of the file you were working on. Look in your working directory for a filename with the extension .save.   Some commands inside pico include the following keystrokes:     * CTRL/a Move to the beginning of the current line.     * CTRL/e Move to the end of the current line.     * CTRL/v Move forward one page.     * CTRL/y Move backward one page.     * CTRL/w Search for text (whereis).     * CTRL/L Redraw a garbled screen.     * CTRL/d Delete the current character.     * CTRL/^ Begin selecting text.     * CTRL/k Remove (cut) current line or selected text.     * CTRL/u Paste (uncut) last cut text at the cursor position.     * CTRL/j Format (justify) the current paragraph.     * CTRL/t Spell check the text.     * CTRL/r Insert (read in) a file into this file.     * CTRL/o Save (output) the file.     * CTRL/g View Pico’s online help.     * CTRL/x Exit Pico, saving the file.