Category Archives: Tech

VAST Storage API & JQ

Glendalough Hiking Trail
Hiking Glendalough Park in Ireland

Vast builds some neat storage systems that provide management functionality via a REST API.

jq is a command-line JSON processor, or as the author describes it “sed for JSON”.

This is how I use both tools to get a quota’s used capacity:

curl -u $USERNAME:$PASSWORD --insecure -X GET "https://your-vast-dashboard/api/quotas/" -H "accept: application/json" | jq  ".[]|select(.used_capacity_tb | length > 0) | {name: .name, used: .used_capacity_tb}" 

USERNAME and PASSWORD are environmental variables set to the username and password you use to access your VAST API. Change to URI to point to your VAST appliance.

OnePlus One: No LTE or Network

I recently upgraded my OnePlus One to Android 6.0.1 and while I can make phone calls I don’t have any network connectivity unless I’m on WiFi. The symptoms are;

  • Can’t send email,
  • No access any websites
  • Phone is not on a LTE network

This awkward fix, posted byrohitvermamech on the OnePlus Forums  get’s LTE and networking working again:

Step 1:
Go into Settings > Mobile Networks > Access Point Names > Restore Defaults
The list should now have many many more choices of APNs. Choose the correct APN. Then go into Settings > Mobile Networks > Network Operators (make sure you are connected to WiFi) click “Choose Automatically”. Then turn Aeroplane Mode on and back off.
Step 2:
VERY IMPORTANT! Restart your phone.
Step 3:
Go into phone and dial *#*#4636#*#* and choose Phone Information. In Phone Information set the Preferred Network Type to LTE/GSM auto (PRL) [even if it says it already, do it again]. Turn off the radio. When the radio is turned off, turn the radio back on. Go down to the SMSC and hit “Refresh” and then “Update”.

 

My Phone Collection.

My Phones over the years.
My Phones over the years.

Starting on the left is my very last feature phone a Sony Ericsson C902. Of all of these phones it makes the best phone-calls. Keeping this thing as it was such a great phone.
Still available for $120 at Amazon!
 
Next, Liz’s first Android phone — a Virgin Mobile LG Optimus V.  Keeping this as we can quickly reuse it for any visitors from Ireland and it’s a simple phone to use.
 
Next is my second Android phone a Samsung S2, I got this phone as the screen on my first Android a HTC Sensation cracked. I still have the HTC as I had plans to replace the screen but it’s hardly worth it at this point. The S2 was quite a step-up, lovely screen but it was missing a little something (this phone is being gifted to a friend for reuse), I hope he finds it better than today’s cheap Android phones.
Next up is my 3rd Android a Google Nexus 4, this was the first Android phone that really, really impressed me and is still a great device — fantastic camera too. I use this as my Irish Phone and it has my Irish SIM card in it and I’ll be walking around Ireland later this week with two phones as my US T-Mobile plan gives me free texts and data while in Ireland, and I can make free phone calls to any Irish phone after topping this up with 20 Euros.
 
The big yoke is my current phone a OnePlus One, fabulous device almost too big but at least I can read the text on the screen! 😉
Next a sweet Amazon Fire Phone that is someone’s Christmas present. Hopefully the Amazon App Store won’t be a dealbreaker …

The Nokia 6230!

Nokia 6230i
Nokia 6230i

Do you remember when a phone like the Nokia 6230 was the phone to have? I remember trying to get one of these for use in the US after seeing a friend’s phone in Ireland. At the time you could only get this model on the Cingular network and the things cost hundred. This phone was a classic for it’s time and it was durable and just worked and it’s form-factor is a classic from the period.

GSMarena has specs on the phone, and Wikipedia has a badly written page about. Those things sold for hundreds of pounds/euros/dollars when they were new in 2005, now you can get one on Ebay for less than 20 quid.

And these days you can an Android phone on Amazon for as low as $30 that’s more powerful that a 2005 era laptop. And you know, I still want this phone, the only problem is I can’t read the screen as it’s too small!

ChemBioDraw/ChemDraw segfault on Mac OS X.

A user at work reported that ChemDraw suddenly started segfault-ing (crashing) on startup on his Mac. He’d opened a support ticket with CambridgeSoft and tried their suggestions, basically deleting every file associated with ChemDraw and reinstalling, which didn’t correct the problem.

I suspected that this was an issue with ChemDraw 12.0.2 (I’m using 12.0.1 and so are other CMLD members for the research lab I support). I suggested that he create a new user on his Mac and see if ChemDraw works correctly. I reasoned that ChemDraw was upgraded sometime in the past, and that there may have been some user preferences causing issues after upgrading, or some preferences settings were corrupted.

If a new user was able to use ChemDraw, then this would indicate that the installation is valid and working, and the issue is with the user’s preferences. If ChemDraw didn’t work, then the issue is probably with the installation, and we would need to install the application, and hunt down any remnants of the installation that may be in /Library or /System and then reinstall 12.0.1 to see if that would resolve the problem.
In this case, ChemDraw worked for the new user, thus indicating that the issue was not with the installation, but with the user’s setting. Deleting any files whose name started with com.cambridgesoft files in

/Users/[Your User Name]/Library/Preferences

resolved the problem.

Bluetooth Stops working After upgrade to Mac OS 10.6.3

Friday before I left work I kicked off the upgrade to Mac OS 10.6.3 on the MacBook Pro (MBP)  I use at work. I’d already upgrade my personal MacBook at home (that I got a deal on at MicroCenter) and I didn’t have any observeable problems or issues and I was confident that I could upgrade and not bork my work environment.

When I arrived back into work on Monday it looked like the upgrade had completed. I logged into the MBP and  my Bluetooth MagicMouse wasn’t working, and all  bluetooth settings were unavailable and grayed out (both on the status bar, and in System Preferences).

I figured something had gotten out of sync during the upgrade and I thought a reboot would fix the problem. Rebooting didn’t fix the problem, but manually reinstalling the upgrade did solve the problem and Bluetooth is active and settings are accessible.

You can manually get the upgrade at:

http://support.apple.com/kb/DL1017

However, when I tried to sync with my phone, a Sony Ericsson C902, the connection keeps dropping. So Bluetooth in 10.6.3 might be a bit flaky.

Install Oracle SQL Developer on Ubuntu Karmic & Lucid

If you want to install Oracle’s SQL Developer on Ubuntu (or another DEB based system such as Debian) you can do one of the following:

  1. Download the RPM package and install using rpm (not advisable).
  2. Download the RPM package and convert to a DEB package using alien
  3. Download the ZIP file titled “Oracle SQL Developer for other platforms” and manually install
  4. Use the make-sqldeveloper-package to convert the ZIP file into a DEB package

I used the make-sqldeveloper-package, which is available for Debian and Ubuntu and it’s derivatives. However, the man page and the instructions are little unclear on how to use it. You need to download the zip file available at Oracle’s (and not the RPM file nor any of the other packages) and then use the make-sqldeveloper-package to convert it to a DEB which you can then install using the dpkg command.

This is preferable to using rpm or alien as you can more easily manage the package using Debian’s and Ubuntu package management tools, plus it will integrate SQL Developer into Gnome’s Menu System . Plus, when Oracle updates their version you can use make-sqldeveloper-package to create an updated DEB package and easily update the version you have installed. The procedure outlined below works on Ubuntu Karmic and should also work on any Debian version that has the make-sqldeveloper-package.

As the man page states:

This utility will require you to download the “Oracle  SQL  Developer  for  other  platforms”  archive  from  <http://otn.oracle.com/software/prod‐ucts/sql/> to create the Debian package from.

1. Download the ZIP file from Oracle’s site

You will need to accept Oracle’s license agreement and download the ZIP file, titled “Oracle SQL Developer for other platforms”, from:

http://www.oracle.com/technology/software/products/sql/index.html

2. Install the make-sqldeveloper-package package

sudo apt-get install sqldeveloper-package

You will need Ubuntu’s multiverse software repository. See the instructions on how to do so.

2.a. Install the tofrodos package

sudo apt-get install tofrodos

Create symbolic links to the tofrodos commands to allow the sqldeveloper-package to work:

sudo ln -s /usr/bin/fromdos /usr/bin/dos2unix
sudo ln -s /usr/bin/todos /usr/bin/unix2dos

Thanks to Miles for the tofrodos tip.

3. Convert the ZIP file to .DEB package

The format of the command is:

make-sqldeveloper-package -b BUILD_LOCATION LOCATION_OF_ZIP_FILE

In my example, I’m going to use /tmp/ORA as the build location and the ZIP file has been download to my Desktop (~Desktop).

make-sqldeveloper-package -b /tmp/ORA/ ~/Desktop/sqldeveloper-2.1.0.63.73-no-jre.zip

The command will create the build directory and remove it when the command finishes. If the command completes successfully you’ll see the following output after a minute or two:

make-sqldeveloper-package: Building sqldeveloper package in "/tmp".

The DEB file will be created in the current directory. In my example I had changed directories to /tmp and that’s where the DEB file will be:

/tmp/sqldeveloper_2.1.0.63.73+0.2.3-1_all.deb

See the man page for more information about the tool:

man make-sqldeveloper-package

4. Install the package

sudo dpkg -i sqldeveloper_2.1.0.63.73+0.2.3-1_all.deb

5. Run SQL Developer

After installing there should he an entry in Gnome’s menu to start the SQL Developer. It’s located under:

Applications->Programming->SQL Developer

Note: You will need a JVM installed for the tool to run.

Obligatory Screen Shot:

Oracle SQL Developer

Updated September 27th 2010. Added instructions from Miles on installing dos2unix alternative for Ubuntu Lucid. The dos2unix command is not available in Ubuntu Lucid.

Ubuntu Jaunty & ATI

This is quick’n’dirty writeup to help others who might have the same problem. I’ll clean this up later in the week …

Ubuntu Jaunty is the new beta version of Ubuntu. It comes with a new version of X.Org and the ATI drivers have been incompatible with this version of X.Org. ATI recently released drivers that support X.Org 1.6. If you have problems with X not starting follow the instructions here:
https://wiki.ubuntu.com/X/Troubleshooting/FglrxInteferesWithRadeonDriver

For me what happened is that X wouldn’t start properly and cause my Lenovo T400 to freeze and lock up. The laptop would boot but when X would start (when the login screen appears) I’d get a black screen with red lines at the top. To solve this I booted to runlevel 1, also known as failsafe mode. If your using a laptop with wireless, I suggest you connect directly to your router using a network cable, otherwise you may have to configure wireless manually (it’s not that hard).

When your system starts, select failsafe mode, on the next screen to appear choose the option to go to a “root shell with networking”.

Next remove the install ATI drivers and install from scratch the ones you need:

sudo apt-get remove –purge xorg-driver-fglrx xserver-xorg-video-ati xserver-xorg-video-radeon
sudo apt-get install xserver-xorg-video-ati
sudo apt-get install –reinstall libgl1-mesa-glx libgl1-mesa-dri
dpkg-reconfigure -phigh xserver-xorg

If this doens’t work for you see the Ubuntu page mentioned above.

Testing 1 2 3 … er what comes next?

I started Firefox in safe-mode and now my WordPress editor is working fine. Methinks, maybe Google Gears was fecking up the editor somehow. Uninstalling Google Gears, exiting FF, restart in normal mode and see if my hypthosis is valid.

Yup, that might have been it. Some weird caching issues (even after clearing out the regular cache) or Google Gears was out of sync, and woudn’t sync properly, with the upgraded version WordPress. I’ll reinstall Google Gears at some point in the future and see what happens