Friday, July 8, 2022

Oracle fun without dba privileges

A selection of information you can find on Oracle without special privileges. * Oracle version select * from v$version; * Password expiration date for this user select username,expiry_date from user_users; * Number of rows in this user's tables select table_name,num_rows from all_tables where owner = 'THISUSER' order by table_name; * Possession of the DBMS_LOB role Some critical info DOES require special privileges, including * User session limit * Maximum processes per SID And I'm not sure about * Storage utilization by this user * Storage utilization by this SID * Grants to this user from neighboring users

Wednesday, November 10, 2021

How to download Elastic plugins

 There's no searchable answer for this, so I hope mine finds its way into an index somewhere.

How do you download Elasticsearch plugins?
How do you download Elastic plugins directly?
How download Elastic plugin proxy?
Where Elastic plugin repo argh?

Simple answer:  There's a download link on each plugin page.  

For example, there's a link to the current artifact in the middle of the Analysis-SmartCN page. which is listed on the Plugins and Integrations page.

It's obnoxious.  It's the last place you'd look if you're not handcrafting this stuff.  But at least now you can stop using elasticsearch-plugin to download these things into a dummy instance.

Here are the four plugins you need to use ES 7.15 with Liferay 7.2 or 7.3.

To install, use the file:// parameter, e.g., 

elasticsearch-plugin install file:///path/to/zip


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