Intellij IDEA SCSS File Watcher

I use IntelliJ IDEA on a Centos VM for AngularJS development at work, and I have a FileWatcher configured to compile the SCSS files from the designer into CSS when they change. It stopped working one day.

After days of bad behaviour because I did not have the correct CSS, I compared configs. Mine looked like (from the exported file):

<option name="arguments" value="compile $ModuleFileDir$/src/main/webapp/ui/src" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" value="Compiles .scss files into .css files" />
<option name="exitCodeBehavior" value="ERROR" />
<option name="fileExtension" value="scss" />
<option name="immediateSync" value="false" />
<option name="name" value="SCSS" />
<option name="output" value="$ModuleFileDir$/src/main/webapp/ui/src" />
<option name="outputFromStdout" value="false" />
<option name="passParentEnvs" value="true" />
<option name="program" value="/usr/bin/compass" />
<option name="scopeName" value="Project Files" />
<option name="trackOnlyRoot" value="false" />
<option name="workingDir" value="$ModuleFileDir$/src/main/webapp/ui" />

Hers, as it turns out, did not check for syntax errors:

<option name="checkSyntaxErrors" value="false" />

And as it turns out, the designer just started delivering SCSS files with errors last week. So mine never got compiled. Fixed. Duh.

Posted in Computers, howto, Software | Tagged , , , , , | Leave a comment

Yet another Airlink 101 DD-WRT adventure

Client needs a cheap Wi-Fi and router. Fast trip to eBay and for $5 plus $6 shipping, I get an Airlink101 AR690w with Wireless-N. Three antennas. Looks good.

AR690w is on the supported list, with an older version and a new version. I tried the current release, and the uploader for the stock firmware was not happy. So I uploaded the factory firmware upgrade, buried on the first page, to start it off.

Bam! DD-WRT is on the air. But I cannot connect via the router Ethernet ports. I connect via Wi-Fi, the console is up, but there is no way to enable the wired ports.

Some quick reading in the DD-WRT forum on Airlink AR690w BS 14473 switch not working. Turns out the firmware listed as working does not work. Some dude Brainslayer figured it out, and created new firmwares for the device. So why is it on the working download page? Dunno.

So after registering with DD-WRT forum, I was able to download the Brainslayer stock firmwares. Tried the factory. Nope. Tried the other one. Nope. No connect, no Wi-Fi. Brick? The router puts up an emergency upload page for new firmwares. Nice.

Found Airlink AR690w Brainslayer switch not working. Some more tries. Then in another post, I was able to download the stock firmware. Reflashed, and it came up singing!

Now try the factory Brainslayer version.  Success!

I might keep this one and give the client the AR430W. With DD-WRT of course.

Posted in Computers, howto | Tagged , , , , , , | Leave a comment

Why doesn’t my #!@$#$%@ console show my variables?

Given: Google Chrome, Dev Tools open, Console open. Paused at breakpoint.

$scope.currentDb
$scope.currentDb
$scope.currentDbb
$scope.currentDb
Date.now()

Nothing prints. Why?

Give me a few hours.

Finally, consider the log level selector bottom right of the console panel. Note the current selection is “Debug”. Click the “All” button.

$scope.currentDbb
undefined  (should be)
$scope.currentDb
WebSource {dbName: "name", dbIcon: "name.gif", hasMoreResults: undefined, dbTotalHitCount: "500", dbID: "id"…}
Date.now()
1390414361482

Sigh.

Posted in Computers, howto, Software | Tagged , , , , , , , | Leave a comment

Flashing an AirLink router again and again with DD-WRT

I got an Airlink 101 AR430w router from a dude at a McHenry County Software Craftsmanship meeting. He had already flashed it with DD-WRT and like a moron I tried a web firmware upgrade to the latest build 21061 – without knowing what it fixed. Then you turn it on, it powers up, and sits there. Reading: Airlink AR430w flashing instructions

References:

After 2 days of on-and-off messing around, I finally got a telnet session going into the router. You need to have an isolated network so DHCP doesn’t play tricks – I used a laptop on WiFi with an unused Ethernet port and manually set the IP to 192.168.1.10, to play in a different subnet than the WiFi 192.168.0.X. Power up the router, telnet 192.168.1.1 9000 and Putty supplied the Ctrl+C when needed.

I downloaded the new flash files (for the one release older, 14896), set up the Windows TFTP32 server, and killed the laptop firewall. Then I started getting this timeout error. Flashes would not work.

DD-WRT> load -r -b 0x80041000 linux.bin
Using default protocol (TFTP)
TFTP timed out 1/15
Can't load 'linux.bin': operation timed out
DD-WRT> 

Over and over. Read OpenWRT pages, Could not get it to work. As I read, most folks blamed network issues – maybe I had too much going on in my laptop with Virtual Box virtual NICs. I even tried the recommended DrayTek Router Tools from this article on DD-WRT – which worked great, but STILL timed out.

Finally took my brother’s Linux box I am configuring as a firewall – another fun project. It has two NICs, eth0 to 192.168.0.X, internal net, and eth1 I configured as 192.168.1.10.

eth0      Link encap:Ethernet  HWaddr 70:71:bc:77:XX:XX
          inet addr:192.168.0.239  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::7271:bcff:fe77:6140/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth1      Link encap:Ethernet  HWaddr 00:22:3f:e9:YY:YY
          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::222:3fff:fee9:4973/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

I installed tftp and tftpd, and added this config (based on this thread in the DD-WRT instructions)

mike@filter:~$ cat /etc/xinetd.d/tftp
service tftp
{
 protocol = udp
 port = 69
 socket_type = dgram
 wait = yes
 user = nobody
 server = /usr/sbin/in.tftpd
 server_args = /tftpboot
 disable = no
}

This crashed the router again. Was in one of the instructions. Not sure why

DD-WRT> ip_address -l 192.168.1.254/24 -h 192.168.1.10

Reset the IP and tried to use the TFTP client to load linux.bin back into the home dir. Worked, so the server was up.

So try yet again…following the flash instructions, but starting after the :

 
root@filter:/home/mike# telnet 192.168.1.1 9000
Trying 192.168.1.1...
                           
DD-WRT> load -r -b 0x80041000 linux.bin
/------------------------------------------------------------------------
-------------------------------------------------------------------------
...  YAHOO IT WORKS!!!! not sure why...
------------------------------------------------------------------------/
Raw file loaded 0x80041000-0x803d2fff, assumed entry at 0x80041000-
DD-WRT> fis create linux
. Erase from 0xbfc30000-0xbffc2000: 
. Program from 0x80041000-0x803d3000 at 0xbfc30000: 
. Erase from 0xbffe0000-0xbfff0000:
. Program from 0x80ff0000-0x81000000 at 0xbffe0000: 
DD-WRT> fconfig boot_script true
boot_script: Setting to true
Update RedBoot non-volatile configuration - continue (y/n)? y
. Erase from 0xbffe0000-0xbfff0000:
. Program from 0x80ff0000-0x81000000 at 0xbffe0000:
DD-WRT> fconfig boot_script_timeout 3
boot_script_timeout: Setting to 3--
Update RedBoot non-volatile configuration - continue (y/n)? y
. Erase from 0xbffe0000-0xbfff0000:
. Program from 0x80ff0000-0x81000000 at 0xbffe0000:
DD-WRT> fconfig
Run script at boot: true
Boot script:
Enter script, terminate with empty line
>> fis load -l linux
>> exec
>>
Boot script timeout (1000ms resolution): 3
Use BOOTP for network configuration: true
Default server I
Use BOOTP for network configuration: true
Default server IP address:
Console baud rate: 9600
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
Update RedBoot non-volatile configuration - continue (y/n)? y
... Erase from 0xbffe0000-0xbfff0000: .
... Program from 0x80ff0000-0x81000000 at 0xbffe0000: .
DD-WRT> reset

Router starts up. I get a website at http://192.168.1.1:8080/

Yippee!

Posted in Computers, howto, Software | Tagged , , , , , , | Leave a comment

Jasper

Friday:
Eric dropped Dave off at the airport at 5:00AM (thanks, Eric) and we met him for breakfast at 8AM. He was the worse for wear, at 12:30AM, the floor fire alarm went off, scaring the heck out of us. The worst is the mechanical voice stating. “We are investigating”. You just lay there and hope you don’t die, and listen to the fire trucks come. The you go back to sleep. Turns out Dave went downstairs, and it was some control system that wasn’t right. Eric couldn’t sleep anyway, and being waken up by an alarm is not good.

After breakfast, we headed off to Jasper. Of course, we have to make it thru the traffic on 97 St and 1, which was so backed up with construction it took us an extra half hour to get out of Edmonton. After the escape, we made good time all the way to Jasper, stooping for gas once in Niton Junction. We stopped at the gate to Jasper National Park and a pleasant woman asked our plans and charged us for two days in Jasper and Banff. (35CAD)

On the way, we discussed attractions. We wanted to be frugal, but heck, we were on vacation and wanted to see everything. Tina had recommended the Maligne Lake tour in Jasper, and based on the pictures on the Web, I wanted in. We called on the way – no reservations on the phone, and only two slots each in the two cruises remaining in our arrival timeframe.

POINT: From Edmonton, go directly to the lake – they sell tickets there too.

We stayed at the Athabasca Hotel in Jasper, centrally located and loaded with personality. It looked like an old Western hotel, and Eric’s room certainly did with a single washstand, and bed – and that’s it. He had a common washroom, which saved money but was not going to work for Bette.

We went to the visitor center first, looking for the Maligne Lake tour. They directed us to the Brewster center down XXX street, but we had trouble finding it. We managed to walk down most of the streets downtown – it is small and very manageable, and eventually found the office, and signed up for the 3PM tour. We first stopped at the hotel, found our rooms not ready, and headed out to the Maligne Lake road, a bit XXX of Jasper. Well, the road is, but you drive at least a half hour to get to the lake from the main road.

We of course missed the big “P” sign and had to U-Turn to get into the parking lot. Ran into the ticket office, exchanged our vouchers for boarding passes and went into the visitor center / gift shop / snack shop to try to eat a bit.

Posted in Fun, Travel | Leave a comment

Converting from PocoMail to Gmail

Wifey was tired of PocoMail. It has not been revised in years, the HTML renderer, while “safe”, is not very conformant, which translates into lots of Tech Support calls. Me. Since she uses Gmail at work, why not migrate to Gmail?

PocoMail uses Unix MBOX format files to store email – very nice, a standard format, no translators needed. But how to get into Gmail?

Use the Google. “How can I import messages that were exported from a university mail system using Pine?” had some good hints, but its most valuable recommendation was IMAPSize, a 2009 vintage utility to browse and manage IMAP mail stores. I was able to create the folders I wanted in Gmail, open with IMAPSIze, and browse into the correct folder. Right-click, “Upload…”, choose the PocoMail data file for that year (renamed from .mbx to .mbox, so I could tell which had been done already), and let er rip.

IMAPSize can be a bit hinky; sometimes it locks up at the end of a transfer, and it would be nice to do multiple uploads concurrently. Oh, well. For large MBOX files it takes a bit of time, but after a few hours of loading and waiting, it was done.

Contacts were easier. I found the address book .ini files in the PocoMail Address tree and was able to add column headings after renaming the file to .csv. That allows the GMail contacts import to use the correct column. Piece of cake. Only the mailing lists are questionable. I didn’t bother – when we need them again, it is easy to make a list.

Changed some redirection on the Domain, had GMail pick up the POP mail. Done. She can now check her email from school on a familiar, decent HTML client without sitting at “THE” computer.

Kudos to the IMAPSize developers. I dread the day when these great utilities no longer work on the “current” OS. Please put the code on GitHub.

Posted in Computers, howto, Software | Tagged , , , , , , , , , , | Leave a comment

Converting ISO-8601 date strings to Date in Pentaho Kettle

So I was working on a conversion from a CSV dump from a student system to our internal label database. New school year, new students. I like to use the time format yyyy-MM-ddTHH:mmZ (ISO-8601, a standard format) for strings, but Pentaho Kettle has no explicit conversion from an ISO-8601 string date to a date type variable.

You would think this would be easy. Not really. Java Date conversion is simple, so could I use the Java Class transformation? Javascript? I Googled a lot, and considered writing a custom conversion plugin — after seeing the API, not so much – a multichannel conversion is a LOT more complex than a simple string parser. Then I read ISO-8601 date format support and Dealing with Dates in Pentaho and found hints. Buried in there, the conversion.

Use a “Select/Rename Values” Kettle transformation. “Fieldname” gets the ISO-8601 value from the input stream, “Rename to” is the output stream field (I used “date”), Type is “Date”, and “Format” is “yyyy-MM-dd’T’HH:mm’Z'”. Note the ticks. Very strangely escaped.

Works like a charm.

Posted in Computers, Software | Tagged , , , , , , , , , , | Leave a comment

Building Git 1.8 on Centos 6

We use Centos as a VM for development. Intellij IDEA was complaining about the 1.7.1 version from the Centos distro, requiring 1.7.1.1. Picky.

So I grabbed the git source:
$ git clone https://github.com/git/git
$ cd git
$ make
...
http-push.c:920: error: ‘xml_cdata’ undeclared (first use in this function)
http-push.c:921: warning: implicit declaration of function ‘XML_Parse’
http-push.c:926: warning: implicit declaration of function ‘XML_ErrorString’
http-push.c:927: warning: implicit declaration of function ‘XML_GetErrorCode’
http-push.c:930: warning: implicit declaration of function ‘XML_ParserFree’
http-push.c: In function ‘remote_ls’:
http-push.c:1154: error: ‘XML_Parser’ undeclared (first use in this function)
http-push.c:1154: error: expected ‘;’ before ‘parser’
http-push.c:1161: error: ‘parser’ undeclared (first use in this function)
http-push.c:1164: error: ‘xml_cdata’ undeclared (first use in this function)
http-push.c: In function ‘locking_available’:
http-push.c:1228: error: ‘XML_Parser’ undeclared (first use in this function)
http-push.c:1228: error: expected ‘;’ before ‘parser’
http-push.c:1235: error: ‘parser’ undeclared (first use in this function)

Oh man, compile errors. Bad.

The key seemed to be:
expat.h: No such file or directory

A bit o Googling: missing library headers.
$ sudo yum install expat-devel

Restart the build. Works.

$ make install

Whee!
$ git --version
git version 1.8.3.2.768.g911011a

ps. Dont forget the
export PATH=~/bin:$PATH

Posted in Computers, howto | Tagged , , , , , | Leave a comment

Chicago Day 2013

No traffic. What is wrong? Off to The Antique Lady for selling some pictures. Not good enough, no pedigree. We ended up donating them.

Lunch at the Little Market Brasserie in the Talbott hotel. The last time, it was a different place. Got to sit outside in the lovely weather. Chellie had the chopped salad, Bette had the Lobster roll, I had the Big Baby burger. Good. Damn parking in the Gold Coast garage cost more than lunch.

Drop Bette off at her Tri Delta event at the Women’s Athletic Club. Lots nicer than the Body Club at home. Even had an elevator operator. And bathrooms — surprise! — Men’s rooms are kinda hard to find.

Raced to make the boat at 3:30P. Chellie and I paid at the kiosk, jumped on and seconds later were off on the Wendella Architecture boat tour. Lots of fun. Good guide. Never saw the buildings from that angle. Want to take the Chicago Architecture Fdn one to compare.

Then we head to Gage on S Michigan where we got Moscow Mules, the new hot drink from the 40’s. We waited for Bette in the bar, who was waiting for us at the boat – she finally called and we called her in. We had a Mule waiting, so it was all good. After supper – some roasted bone marrow, and split beet salads. And some good draft beers.

Then it’s off to The Book Of Mormon at the Bank of America Theatre, 18 W Monroe. If you like South Park, you’ll love it. Then pay another gob of parking money, drop Chellie off at her apartment, and off to the 1.25 hour drive home.

Note: if you park for a show, try to show up within 5 hours of the show. We got there earlier and were charged the full standard rate, not the discounted rate specified on the ticket.

Posted in Postcards, Travel | Tagged , , , | Leave a comment

Building KDiff3 on Centos 6

My goto diff tool on Windows is the open-source WinMerge. On Linux, Ubuntu has an installable KDiff3, a member of the Qt-based KDE family of tools. At work we are using Centos 6 as our dev VM, and no installable KDiff3 is available.

So the README says to

$ ./configure kde4

and it should build and install. Our VMs had Qt installed already, but it failed getting the kdelibs. The instructions specified:

   - libkde4-devel (KDE4 Header files and development libraries)

So get them. Right?

$ yum install libkde4-devel
...
updates                                                  | 3.4 kB     00:00     
Setting up Install Process
No package libkde4-devel available.
Error: Nothing to do

I am not a lib guru, but have done work on Qt (but Windows and Mac) and some Linux devs. After struggling from one to another I found:

$ yum list | grep kde
kde-filesystem.noarch                    4-30.1.el6                     @base   
kde-settings.noarch                      4.3.1-1.el6.centos             @base   
kdebase.x86_64                           6:4.3.4-6.el6                  @base   
kdebase-libs.x86_64                      6:4.3.4-6.el6                  @base   
kdebase-runtime.x86_64                   4.3.4-9.el6                    @base   
kdebase-runtime-libs.x86_64              4.3.4-9.el6                    @base   
kdebase-workspace.x86_64                 4.3.4-24.el6                   @base   
kdebase-workspace-libs.x86_64            4.3.4-24.el6                   @base   
kdebase-workspace-wallpapers.noarch      4.3.4-24.el6                   @base   
kdelibs.x86_64                           6:4.3.4-19.el6                 @base   
kdelibs-common.x86_64                    6:4.3.4-19.el6                 @base   
kdelibs-devel.x86_64                     6:4.3.4-19.el6                 @base   
kdelibs-experimental.x86_64              4.3.4-3.el6                    @base   
kdepimlibs.x86_64                        4.3.4-4.el6                    @base   
...

Aha! In Centos/RedHat/Fedora, the package is different — or maybe the project itself changed the lib names, and the doc is stale…

So this was the happy path for me:

$ sudo yum install kdelibs-devel
$ sudo yum install cmake
[releaseKde]$ kde4-config --prefix
/usr
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr
$ make
$ sudo make install

A colleague for whom I was trying to get this to work installed the correct lib, and then the $ ./configure kde4 worked fine. Probably totally obvious to a Linux guru, but a good exercise for a lib-newbie.

Posted in Computers, howto, Software | Tagged , , , , , | Leave a comment