WordPress Update Fun

Time to update WordPress to 4.7.3. I used the SVN method.
I was using an older version of SVN and required me to update the local checkout.
$ svn upgrade

Fine. Did it.

$ svn sw https://core.svn.wordpress.org/tags/4.7.3/ .
svn: E155025: 'svn switch' does not support switching a working copy to a different repository
svn: E155025: 'http://core.svn.wordpress.org/tags/4.4'
is not the same repository as
'https://core.svn.wordpress.org'
What?
$ svn info

Path: .
Working Copy Root Path: /.../blogs/chwalisz
URL: http://core.svn.wordpress.org/tags/4.4
Relative URL: ^/tags/4.4
Repository Root: http://core.svn.wordpress.org
Repository UUID: 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Revision: 36122
Smells like I need to relocate, like I did when they moved from the automattic svn repo.  See codex Relocating From The Old svn.automattic.com
First see what it SHOULD be:
$ svn co https://core.svn.wordpress.org/tags/4.7.3 new-chwalisz-test
A    new-chwalisz-test/index.php
A    new-chwalisz-test/wp-config-sample.php
...

^new-chwalisz-test$ svn info
Working Copy Root Path: /.../new-chwalisz-test
URL: https://core.svn.wordpress.org/tags/4.7.3
Relative URL: ^/tags/4.7.3
Repository Root: https://core.svn.wordpress.org
Repository UUID: 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Revision: 40218
Note the change:
Repository Root: http://core.svn.wordpress.org
to
Repository Root: https://core.svn.wordpress.org
Try?
svn switch --relocate http://core.svn.wordpress.org/tags/4.7.3 https://core.svn.wordpress.org/tags/4.7.3/
BUT — svn 1.7 supports the relocate option.
so maybe….
instead of
$ svn relocate http://svn.company.com/repos/trunk
we use
$ svn relocate https://core.svn.wordpress.org/tags/4.7.3/
Let’s try!
/blogs/chwalisz$ svn relocate https://core.svn.wordpress.org/tags/4.4
/blogs/chwalisz$ svn info
Path: .
Working Copy Root Path: /.../blogs/chwalisz
URL: https://core.svn.wordpress.org/tags/4.4
Relative URL: ^/tags/4.4
Repository Root: https://core.svn.wordpress.org
Repository UUID: 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Revision: 36122
So does it blend?
$ svn sw https://core.svn.wordpress.org/tags/4.7.3/ .
NOW we have some conflicts. I did not mark as resolved – maybe should have…
/blogs/chwalisz/wp-content/themes$ svn st
D C twentyten/404.php
 > local file unversioned, incoming file add upon switch
D C twentyten/archive.php
 > local file unversioned, incoming file add upon switch
...
D twentyten/images/headers
D twentyten/images/headers/berries-thumbnail.jpg
...
Summary of conflicts:
 Tree conflicts: 138
/blogs/chwalisz/wp-content/themes$ cd twentyten/
/blogs/chwalisz/wp-content/themes/twentyten$ svn st
D C 404.php
 > local file unversioned, incoming file add upon switch
D C archive.php
 > local file unversioned, incoming file add upon switch
...
D images/headers 
D images/headers/berries-thumbnail.jpg
...
Summary of conflicts:
 Tree conflicts: 30
/blogs/chwalisz/wp-content/themes/twentyten$ svn revert --recursive .
Reverted 'archive.php'
Reverted 'single.php'
...
Reverted 'images/headers/berries.jpg' 
Reverted 'images/headers/path.jpg'
...
/blogs/chwalisz/wp-content/themes/twentyten$ svn st
/blogs/chwalisz/wp-content/themes/twentyten$ <nothing!!!>
Repeat until bored…
svn st is now clean, except for my manually edited themes.
Now visit the usual wp-admin/upgrade.php URL
Done!

The New Napster and Launchy

Rhapsody, the long-suffering little brother streaming music service, recently rebranded itself as Napster. Same app, different name. Big deal.

I noticed that I could not start the app with the great Launchy in my new Windows 10 install. Not sure if it worked in Windows 7.

Looking at Properties of the launch shortcut, in C:\Users\Me\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Rhapsody International Inc, I noticed that the shortcut has a weird extension, .appref-ms. Having come of age in the era of .com and .exe, this was unknown. Seems it is the launcher for the new  style Windows apps, and Launchy did not know how to find them.

Screenshot (3)

 

So I opened the Launchy options panel, and found the Start Menu folder was already in the search path for catalogs. The extension was missing. So I added “*.appref-ms”

DAC_20160723_Launchy_ms

Rescan, index increased by one. Works. Nice.

Screenshot (4)

Welcome to Windows 10

Finally beat the July 28th deadline for upgrading Windows 7 to Windows 10.

Made backups with Macrium Reflect first.  Paid for that one, got rid of the perpetually flaky Acronis.

Both machines (Intel Core Duo 2Ghz dual-core and old AMD dual core) upgraded successfully. AMD box slow, but it worked, with install apps and files in place. A little juggling the start menu to lose the junk, and we are back in biz.

A potential issue came up where the audio was crackling.  One post suggested the LatencyMon app from Resplendence Software.   Way cool. Said I had serious latency issues and could not host real-time software – like audio. Duh.

This post, Speakers Crackling since Windows 10 update, suggested I reinstall the old audio driver.  Not trying that yet.

Ultimately, this YouTube video, How to FIX Windows 10 Audio/Sound Problem , worked by running the non-low-power power profile. Not sure why that matters – tries to starve the CPU? Seems to work.

Then I replaced the CPU with Intel Core 2 Quad Q9650 3Ghz from eBay for $65. Windows 10 rebooted and barfed a few times; I had to reset the BIOS to even have Windows 10 detect the new CPU. Then I had an issue with the CPU fan, but I think that was related to the dust buildup. 5 minutes with the compressor outside cleaned it out, and using the great HWMonitor program,  cores are running 100-110F. Not bad. The machine runs very smoothly with the new two cores, for very little coin.

Fun with Dell Laptop WiDI

I was messing around with the WiDi driver to stream the Grateful Dead show tonite and disabled the Intel Video driver. At this point, the machine started up, did POST, did the swirly page and then a blue dim (not BSOD) screen came up and nothing. HD activity, not much else.

 Could NOT get safe mode to launch per (Fixya) How to get into safe mode
Using this article, (Dell) Inspiron 17R will not boot (5720) – I tried to change the UEFI boot to legacy boot and was able to run diagnostics and setup.
Then used Pre-boot assessment error 2000-0332, Inspiron 7720  to run the Pre Boot Assessment
After messing around, I was able to see
2000-0332 Video memory – Video memory integrity test discrepancy ePSA diagnostics detected a video memory failure. Please reset the system memory and update the BIOS to most current version/
  • Update to the latest BIOS.
  • Reseat the system memory
  • Turn off your computer and reconnect your LCD cable.
  • Repeat the ePSA diagnostics..
  • If failure continues contact Technical Support
It said to update the Bios, I was at A18, the latest was A19  (Dell) Inspiron 5720 System BIOS
I used (Dell) How to Create a Bootable USB Flash Drive using Dell Diagnostic Deployment Package (DDDP) to create a bootable flash disk. I then copied the new flash utility to the flash image, ran the program to create the flash booter. Booted fine, and ran the installer from the DOS command line. Success.
Reset the boot mode to UEFI or windows would not boot.
It came up with the same blue screen. I started whomping on the LCD/CRT key, thinking I had put the video to external CRT, and I got the login screen. Whew.
Now I need to turn on the safe mode boot option before I try again…
Now why didn’t I want a MacBook???

lineman-angular updated to ng-annotate

We use LinemanJS to automate the build process of various AngularJS projects. Two newer projects use the most excellent UI-router package, and I had some issues. The resolve section required manual protection for minification; ngmin, the automatic minify protector included with lineman-angular, did not handle resolves correctly. So this code:

resolve: {
     liveConfig: function(ServerConfigService) {
       return ServerConfigService.fetchFutureConfig();
     },
     liveLocations: [ "PickSchoolService", function(PickSchoolService) {
        return PickSchoolService.fetchSchools();
     }]}

would not work, as the minifier would convert the ServerConfigService object to, say, a, and that would obviously not match the injected service. Blam.

 liveConfig: function(a) {  // what the heck is a??
      return a.fetchFutureConfig();

There has been a feature request outstanding on this for a while, So yesterday on a longer car ride, I finally got ng-annotate to work on my local project. I was all ready to grab the source for lineman-angular and submit a PR, and found davemo beat me to it:

davemo authored replaces ngmin with ng-annotate 2386ab76016b485a03dfbf684c4639e9235f8a4d

updated my local package.json to 0.3.0 and lineman build. Nice. Now I can rip out all that icky brackety stuff.

Now to make sure – I found that chaining

angular.module("app", ["ui.router", "mm.foundation", "ngStorage"])

.run(function ($rootScope) {
///
})
.run(function($log, $state, $localStorage, $timeout) {
///
})
.run(function ($rootScope, $state, $log, PickSchoolService) {
///
})
.config(['$logProvider', function ($logProvider) {
///
}])
.config(['$httpProvider', function ($httpProvider) {
///
}]);

also had issues in minification. I had to break some files up with the explicit module statement for it to work.

angular.module("app")  // require redeclaring for ng-min support
    .config(function($httpProvider) {
    ///
    });

angular.module("app")  // require redeclaring for ng-min support
    .run(function ($rootScope) {
    ////
    });

I mashed them back together. Seems to work great now. Nice work, all.

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.

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.

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!