Monday, August 23, 2021

Not Unixish: Scanning with the Canon MF4770n and OS 10.14

I just had a rather infuriating half-hour.  Here's how to enable network scanning from MacOS 10.14 to a Canon MF4770n printer.

First, disregard the official Canon documentation. Disregard it as hard as you can.

  1. Go to the device's download page.
  2. The download page may autodetect "Mac OS X" and say no files are available.  Select MacOS 10.14 instead.  There are two; pick the one with more files under it.
  3. Download and install the scan utility, currently mac-scan-2158.dmg .  It includes the driver and some utilities.
  4. Take a moment to visit the printer and make sure the benighted thing has a valid IP.
  5. Open System Preferences -> Printers.  Add the printer, hopefully via Bonjour.  This isn't Windows, so Autodetect will find the driver.
  6. In System Preferences -> Printers, the MF4770n has Print and Scan tabs above its picture.  Select Scan.
  7. On the printer, lay out your document and click the Scan button.  Then choose "Remote Scanner".  The Send-To option is tempting, but doesn't work for me.
  8. Back in System Preferences, click "Open Scanner".  The scanner will automatically do an overview. By default, it'll attempt to identify separate items. 
  9. Once the overview is complete, press Scan. If you disabled Auto Selection, you'll be required to select an area.  By default, images go to the Pictures folder.  

If you receive error code 2100010, it probably means the scanner isn't listening in Remote Scanner mode.

If the scanner doesn't show up after adding the printer in SysPref, MF Toolbox may help.

  1. Open MF Toolbox, which was installed by the driver dmg.  Ignore any warnings about not finding a scanner.
  2. Under MF Toolbox -> Network Scanner settings, add the printer.  Hopefully it shows up over Bonjour; I haven't tried IP. 
  3. Close MF Toolbox; you're done with it.
  4. Scan using SysPref as described above.

H/T to Darius in the Canon forum for showing that the official docs are wrong, and Nidhish on FixYa for demystifying the printer menu.

Monday, August 13, 2018

Bottle shaking: Reset Mac's SMC and PRAM

I just requested help with symDaemon abusing my Mactop's CPU at random and fan noise embarrassing me at meetings. I was advised to reset my SMC and PRAM.

On the off chance it works, these are the dance steps.
  • SMCShut down.  Hold ctrl-option-power.  Watch for the power adapter to flash green.  (Obvs, it helps if the charge LED is orange when you start.  If it's green, I guess it still flashes.
    The machine remains powered down.
  • PRAM  While shut down, hold -option-p-r-power.   When it starts to come up, let go of the power button. 
    Continue holding the other buttons through three reset cycles, marked by the default startup sound. 
    After the third startup sound, let go of the buttons and allow the machine to start up as usual.
The SMC relates to hardware.  It probably won't do anything for my antivirus woes, but might help my dumb machine correctly recognize its lid position. (Apple: How to reset the SMC)

The PRAM is less clear.  It stores startup settings, so ... maybe?  But I haven't seen anything where Symantec admits to storing stuff there.  (Apple: Reset NVRAM or PRAM on your Mac)

Thursday, December 21, 2017

A much easier way to ream out an Oracle schema

This self-concatenating method is much better than the shell-based solution I wrote about a few years ago.

set heading off
set pagesize 0
select 'drop '||object_type||' '|| object_name|| DECODE(OBJECT_TYPE,'TABLE',' CASCADE CONSTRAINTS','') || ';'  from user_objects;
Execute the output, then

purge recyclebin;
select * from user_objects
Very satisfying.  Much less fiddly.

Thursday, January 26, 2017

No, you can't edit Font Book collections

After vigorous searching for "how to delete a font from a group in fontbook" and "how to remove a font from a collection in Font Book" and such, I've concluded that there is no such feature.

These are not the options you're looking for.  Move along.
Did you misfile a useless symbol font in your "Stencils" folder?  Well, valued Mac user, you'll just have to deal with the consequences of your actions.  Apparently you used to be able to drag the offending font onto the desktop and letting it go poof.  However, that's definitely not working for me on 10.11 El Cap.

There's a simple workaround:  The collections themselves can be deleted.  Rename the contaminated collection and create an empty one with the desired name.  Move all the stuff you actually want into the new collection, then delete the renamed contaminated collection via the File menu.

I fully acknowledge that this is going to be useful to precisely nobody I know. Maybe Hugh.  I'm just posting it in the vain hope that it will short-circuit the next person's fruitless search for a nonexisting feature.


Friday, November 25, 2016

Editing cells in SQL Developer

I rarely edit my databases directly, and of those rare edits, I'd say that less than 1% are done to individual cells.  Usually, it's because I need to twiddle a knob that Liferay has buried in an XML CLOB. So when I do need an editable grid, I can only remember how to get to it by browsing, which is incredibly tedious.

But there's a better way!

  1. Find the offending cell using the query worksheet, then copy the WHERE clause.
  2. In the query, hold down ⌘ (Ctrl on Windows) while mouse hovering over the table name.  The table name becomes a link.

  3. Click on that link.  (Once you know about this behavior, you can ⌘-click without hovering.)
  4. Now you're in the data grid for the selected table.  Paste the WHERE clause from your buffer and hit Enter.

  5. Double click on any record to edit it, or right-click on the row to use Single Record View.
  6. YOU WIN.  EVERYBODY WINS.

For the sake of completeness, here's the tedious way:

  1. In the connections browser, expand the schema.
  2. Expand Tables.
  3. Scroll, scroll, scroll down to the desired table.  Wait, you missed it.  Scroll back up.
  4. Click on the table name.  This opens the data grid, as in step 4 above.

h/t That Jeff Smith

Monday, March 2, 2015

Check when your password will expire

I hate to even admit it, but there are still some places where my password is managed locally.  (Ugh.  Maybe I should have put a trigger warning on this post.)  Anyway, this means that it's occasionally useful to know when I last changed my password and/or when I will need to do it again.

It turns out that chage, which I had thought was really only useful for root, provides a way for non-root users to check their own accounts.

somesrvr kexline@somesrvr ~
$chage -l kexline
Last password change     : Mar 02, 2015
Password expires     : Mar 06, 2015
Password inactive     : never
Account expires     : never
Minimum number of days between password change     : 0
Maximum number of days between password change     : 4
Number of days of warning before password expires   : 2

Friday, July 11, 2014

Oracle password expiry without DBA privs

Here's how to get password expiration information without DBA privileges.

SQL> select * from user_password_limits;

RESOURCE_NAME LIMIT
-------------------------------- ----------------------------------------
FAILED_LOGIN_ATTEMPTS 10
PASSWORD_LIFE_TIME 180
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_VERIFY_FUNCTION NULL
PASSWORD_LOCK_TIME 1
PASSWORD_GRACE_TIME 7

7 rows selected.

SQL> select account_status,expiry_date from user_users;

ACCOUNT_STATUS EXPIRY_DA
-------------------------------- ---------
OPEN 03-JAN-15

At some point, I need to collect all my DBA-free Oraclejitsu into a single document.  But I say the same thing to that that I say to death:  "Not today."