Atlassian provides a freely available to the public, command line interface (CLI) for at least some of the tools in their suite. The CLI downloads and documentation are located here. The scripts include a parameter for the password. The password is used to log into the server. No one wants to, nor should they ever, hard code the password in a script.

Here’s a technique to avoid having to hardcode the password when using one of the Altassian shell scripts:

This script is for use with CLI for Bitbucket.

Here’s an example session:

Session showing contents of script and execution
Session showing contents of script and execution

This technique is not ideal…you have to type in the password each time you execute the script. Also, if you use the CLI for two or more Atlassian tools, you have to maintain a separate script for each. A next step would be to write a new script and pass it a parameter for the tool you want to access and the password.

unixODBC is a mess. I installed pyodbc last week. My configuration got wonky. I couldn’t use ODBC. I couldn’t connect to Greenplum from Tableau. I was caught in the tar pit and needed help. Apple no longer supports an ODBC manager application. I decided to try one of two ODBC manager applications that I could find. I tried ODBC Manager. Here’s the About screenshot:

ODBC Manager about
‘ODBC Manager’ About information

Verdict?

My verdict on ODBC Manager: Don’t use it.

I don’t think it’s a supported application. I was trying to create user DSNs. I expected the odbc.ini and odbcinst.ini files to get written out to directory /Users/user/Library/ODBC. Instead, the files (at least odbcinst.ini) were written out to /Library/ODBC.

The app has a bug. You can’t delete driver information from within the app. If you trash the app, the artifact of the odbcinst.ini file will remain. To delete the file, first locate it using this command:

sudo find / -name odbc*.ini 2>/dev/null

Remove the file. Then go back into the app. The driver information is gone.

Recommendations

If you don’t have it installed, don’t install it. If you do have it installed, make sure to remove the ODBC configuration info and then trash the app. (I don’t think the app saves data in directories /Users/user/Library/Containers, '/Users/user/Library/Application Support', or /Users/user/Library/Preferences/, but I can’t 100% vouch for this.) I don’t have a recommendation for a GUI for unixODBC management tasks on Mac OS X. The unixODBC project has as an aim a GUI for KDE and GNOME. Let’s hope that Apple re-releases one. In the meantime, use the command line. And, bonne chance!

This post shows how to include a job number with Perforce changelists submitted from the Bash prompt. Here’s an example of the error:

[user-name@server-name ~/scripts]$ p4 submit -d "ABC-1234 Testing Scala connection to Oracle"
Submitting change 2011453.
Locking 1 files ...
Submit validation failed -- fix problems then use 'p4 submit -c 2011453'.
'bugattached' validation failed: Submissions to this branch must have a bug attached

The strings ABC-1234, changelist number 2011453, and the description, are fill values for use in the post to illustrate the problem and the solution.

If you’re receiving this error at the command line and end up going back to the Perforce visual client, read on. There is a way to submit at the command line. The terms bug number, and job, are equivalent to the JIRA ticket number that I use here.

Including JIRA ticket

The above error is obtained when a validation rule in in place that a bug has to be associated with the changelist. The fix is a three-command process:

[burgerp@ordddmbir01 tools]$ p4 submit -d "ABC-1234 Testing Scala connection to Oracle"
[burgerp@ordddmbir01 tools]$ p4 fix -c 2011453 'ABC-1234' 
[burgerp@ordddmbir01 tools]$ p4 submit -c 2011453

Note: System responses that are displayed after each of the commands have been removed.

It’s a three-step process. It works. Reading the Perforce documentation, it looks like there is a second way to submit at the command line, and using just one command. This second way uses the Jobs parameter within the Perforce Form Field: usage. I couldn’t find a working example. Spending time on it myself, I couldn’t figure it out. If you are aware of how to use the form field, please write in with a comment!

This post shows an example of an entry in the crontab file to run a script once per quarter. The entry does work as intended. After creating the entry in my crontab in January, I had to wait until April 1st to see if it worked as intended.

Crontab for quarterly execution of cronjob

This example executes my script at 10AM on the first day of the month on the first, fourth, seventh, and eleventh months of the year. This scheduled executes the job on the first business day after the end of a quarter:

################################################################
#  First five fields, followed by the command to be executed
#          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).
######################################################################
* 10 1 1,4,7,11 * /usr/local/anaconda3/bin/python /home/user/my-code-rocks.py

References

I relied on the information at these two posts:

http://stackoverflow.com/questions/21773817/crontab-run-a-cronjob-quarterly
http://alvinalexander.com/linux/unix-linux-crontab-every-minute-hour-day-syntax

This post provides information on how to fix one possible cause of the Warning in install.packages: package ‘RPostgreSQL’ is not available (for R version 3.1.1) error during installation of the R RPpostgreSQL package on Linux distributions of R.

You might need to install the Linux RPM postgresql-devel. Execute this command from the Bash prompt:

rpm -qa | grep postgresql-devel

If no results are returned, you don’t have the RPM installed and need to install it. Here’s an example of how to install the RPM:

sudo yum install postgresql-devel

Run rpm -qa | grep postgresql-devel again and you should see results. Here’s an example:

[user-name@server-name ~]$ rpm -qa | grep postgresql-devel
postgresql-devel-8.4.20-1.el6_5.x86_64

The package is not available as a binary and has to be compiled.

The above commands are for RHEL/CentOS distributions of Linux. If you’re using a Debian distribution, the commands will be different but the cause of the error and the approach to fixing the problem are the same. If you’re installing on RHEL/CentOS, you will see the calls to gcc as the code for the package is compiled and the package installed.

For kicks, I just tried to install the RPostgreSQL package on my Mac OS X box:

rpostgresql-install-error-on-mac-os-x

I received the same error. I’m not going to try to fix it but expect that the cause and the approach to fixing the problem are again the same.