Thursday, April 12, 2018

python + oracle

  • install Oracle Instant Client
  • setup a python virtualenv
  • use pip to install cx_Oracle
  • run your python scripts

Oracle Scripting/Python Page
Get Started in 5 minutes

import cx_Oracle
# be sure to activate virtual environment
# source py_oracle_env/bin/activate
# pip install --upgrade cx_Oracle

def connection_url():
    return f"{username}/{password}@{hostname}/{servicename}"

connection = cx_Oracle.connect(connection_url())
cursor = connection.cursor()
for idx,result in enumerate(cursor.execute(sql)):
    print(idx+1, result)

Thursday, April 5, 2018

Wednesday, April 4, 2018

open port on centos


sudo firewall-cmd --zone=public --add-port=8443/tcp --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --list-all

Saturday, March 10, 2018

Thursday, March 1, 2018

Jam Contour Bluetooth Headphones

Jam Contour Bluetooth Headphones

I love my Jam Contour bluetooth headphones.  They work great when walking, hiking or on a run.

Sadly mine (purchased 9/3/2017) stopped powering on.

I called their support line (Number: 888.802.0040) - they asked for the model number (HX-EP750BKA) and local number (2617).  Took my name, address and email address.

They said I can expect a replacement in 2-3 weeks.  Not bad.

Thank you Jam Audio for standing behind your product.

Order Confirmation Number: 4516120
Number: 888.802.0040

Addendum:  1-Mar-2018
Lost an ear-tip (the little foam covers for the ear piece) - called Jam Audio, they took my name/address info and said that I could expect some replacements in 2-3 weeks.  Thank you Jam Audio.

Sunday, February 18, 2018

87 year old man - Will Wegmans do the right thing?

87 year old man - Will Wegmans do the right thing?

Looks like they did

Sunday, February 11, 2018

macmini debacle 2018

macmini debacle 2018

S/N: C07F205PDD6L
Identify your Mac Mini
Mac Mini Install Videos
Enter S/N in Site
Ordered Replacement 500GB HGST Hard Drive
Order Status

How to download El Capitan | Get OS X El Capitan [10.11.6]

Replaced Hard Drive (not too bad)
Tried to install El Capitan from bootable flash drive (problem after install said could not validate)
Got ahold of a Snow Leopard DVD
The mac mini would not accept the DVD
Called Apple Support (spoke to Damon for about 45 minutes - no luck he made appointment for me at Simutek for Thursday at 2pm)
Connected bluetooth keyboard to macmini by continually pushing the power button on the keyboard.
Connected Apple Mouse to macmini by toggling power
Held down the "option" key on keyboard while starting macmini - now asked for WIFI Network - I selected my network and provided the necessary credentials
Unable to install - "Lion is temporarily unavailable"
Realized that the apple id I used when I first got the mac mini was different (was jpda vs jpda@ya***.com) - had to find an old email account associated (was jpda@gm*.com).
Got into forgot my apple id email account on the apple site.
They sent me a reset link - I reset my OLD apple id password.
Then restarted the macmini [with 'option' key held down] - this time from the Mac Utility screen entered Restore/Install Operating System - it again went to install Lion (yes, very old - mid-2010) - this time I entered my OLD apple id and password - now it is loading:  "Mac OS X Lion - Downloading additional components. Your computer will restart automatically."
About 4 minutes remaining
About 3 minutes remaining
About a minute remaining
About 0 seconds remaining
spinning wait icon...
blank screen
sound of reboot
gray apple logo  with spinning wait icon...
Install Mac OS X - Installing Mac OS X on the disk "Untitled"... - Time remaining: About 23 minutes
Time remaining: Less than a minute
Installed Security updates

Online Confirmation Number: L5057393

Mac mini, Mac mini Server - Mid 2010
Model #:A1347
Sales Number:MC270LL/A, MC438LL/A

Items500GB HGST Travelstar Z5K500 2.5-inch 7mm SATA 6.0Gb/s (3.0Gb/s and 1.5Gb/s backwards compatible) 5400RPM Hard Drive with 8MB Cache; HGST 3 Year Limited Warranty.Item Number: HIT0J38065

Total: $44.99