Windows 8.1 Drivers for Brother HL-5250DN

I had a little trouble installing the correct driver for the printer but eventually got it to work — here is how it went.

The manufacturer says the driver is already included with Windows OS:

brother HL-5250DN driver 01

However, I could not complete the driver setup instructions because the setup program (Add Printer) hung when I clicked on the “Windows Update” button, as directed.

So, as a first workaround I did the following:

  • I chose from the “generic” list of Brother drivers the one called “Brother Laser Type1 Class Driver.”

This worked just fine for a few prints I needed to do before I found some time to troubleshoot.

Later, I opened up the printer properties window and clicked the “New Driver” button:

brother HL-5250DN driver 02

Then, find and click “Brother” in the Manufacturer list. Then click “Windows Update.”

brother HL-5250DN driver 03

Wait a minute or two for it to finish downloading the drivers, and then the Printers list should show a bunch more drivers. Find “Brother HL-5250DN” and select it, then proceed through the rest of the dialogs to finish it out.

Once that is done, you should be back in the “Properties” dialog window. Make sure to click OK or Apply so that the new setting is saved.

Getting SharePoint libraries to sync to Windows desktop using OneDrive

I am now attempting to follow Microsoft Tech Support’s recommendation:

  1. Install a Registry entry. Instructions here.
  2. Open command prompt and type the following commands:
    1. %localappdata%\Microsoft\OneDrive\onedrive.exe /reset
    2. %localappdata%\Microsoft\OneDrive\onedrive.exe
  3. Enter credentials and try to sync files again

The Registry Entry part has me download a .reg file containing the following lines:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\OneDrive]
"TeamSiteSyncPreview"=dword:00000001

The file downloaded with a .txt filename extension and so I had to first change this to .reg. Then, I double clicked the file and OK’d through the dialog boxes. When completed, I got a confirmation message saying that the registry entry was added successfully.

Executing the commands at the command prompt shutdown and restarted the OneDrive client. I have two OneDrive for Business drives sync’d to my desktop — both were shut down by the first command and both were started by the second command.

Upon starting, the OneDrive clients appear to be checking each file for changes.

Next, I logged into portal.office.com via both Internet Explorer and Firefox. I then opened OneDrive and went into my SharePoint library. I first tried clicking the “Sync” link in Internet Explorer, which did not work. I next tried the same in Firefox, and got the following popup:

sharepoint sync after onedrive registry and reset

“Microsoft OneDrive” is the option that worked — “OneDrive.exe” just opened up my existing synced OneDrive on my hard drive.

And now, all is well and the SharePoint library has synced to my local hard drive!

Getting autocomplete-python Atom plugin to work on Windows with WinPython

I stumbled around for a little bit with this one. The path to the Python executable must be set in the configuration settings for the Atom autocomplete-python package, and the part of the path with the executable filename must include the .exe filename extension.

For example, the full path to my WinPython executable is C:\Users\UserName\WinPython-64bit-3.5.3.1Qt5\python-3.5.3.amd64\python.exe. Entering this path exactly as shown here worked.

How to set the IPython/Jupyter Qt Console font size on WinPython

TL; DR: create a file called jupyter_qtconsole_config.py under .jupyter\ in the WinPython settings directory (e.g. C:\Users\user\WinPython-64bit-3.5.2.3Qt5\settings\.jupyter\jupyter_qtconsole_config.py) and write the line c.ConsoleWidget.font_size = 12, where the number is what you want the font size to be, in points.

On my Windows machine, for my Python setup, I use WinPython because it is super easy to set up, it’s self-contained, and, if I muck up anything, it is very easy to delete the install and start over. IDEs like JetBrains PyCharm can also be easily set up to point to the WinPython interpreter as well (File > Settings > Project > Project Interpreter) so you can benefit from all the IDE code completion, module analysis, introspection etc etc.

WinPython also comes with a ton of useful modules and “plugins” — Jupyter, IPython (and Qt Console), Spyder, and all the Scientific Python libraries: Numpy, Scipy, Pandas, Matplotlib, etc etc. Python is already “batteries included” — Winpython is like “nuclear reactor included.”

How to reload a Python module

Reloading a Python module can be useful if you are doing interactive testing and development. For example, say you are making incremental changes to a function and with each change you want to poke at it in an interactive console. Or, perhaps you are working in a Jupyter notebook rather than an interactive console. Same idea.

In Python 3.4 and greater, do this:


import importlib
import my_great_module
importlib.reload(my_great_module)

In Python 3 prior to 3.4 do this:


import imp
import my_great_module
imp.reload(my_great_module)

In Python 2, do this:


import my_great_module
reload(my_great_module)

A word of caution from the importlib.reload documentation:

When a module is reloaded, its dictionary (containing the module’s global variables) is retained. Redefinitions of names will override the old definitions, so this is generally not a problem. If the new version of a module does not define a name that was defined by the old version, the old definition remains.

This effect can be demonstrated by calling dir() on a loaded module before and after removing some module variables and reloading the module.

Here are some useful references:

  1. http://stackoverflow.com/questions/437589/how-do-i-unload-reload-a-python-module
  2. http://stackoverflow.com/questions/5516783/how-to-reload-python-module-imported-using-from-module-import
  3. https://docs.python.org/3.5/library/importlib.html#importlib.reload

3D/GPU-related display problems with Atom editor on Xubuntu 16.04 VM

Was having a problem with Atom editor on a new Ubuntu/Xubuntu 16.04 virtual machine. Launching Atom using the --disable-gpu option seems to fix the problem:

$ atom --disable-gpu

Via discuss.atom.io.

Next, need to figure out how to modify the application launch item in the Whisker Menu so that it executes that command instead of the vanilla $ atom command.

 

Audio quality peculiarities on mobile YouTube app

I noticed a weird thing today, watching Harvard i-lab | Startup Secrets Part 1: Value Proposition – Michael Skok, and that weird thing was that the audio for this video sounded really bad when played through my iPhone 6S speaker but sounds totally fine when I plug my headphones in. There is definitely audible compression-related distortion even through the headphones but it’s not at all a problem for listening comprehension. In contrast, the audio is extremely difficult to understand when played through the iPhone speaker. I wonder if this is app shenanigans or if it is an interesting hardware (i.e. speaker + drive electronics) interaction with the raw audio signal from the YouTube stream. I am kind of hoping for a weird corner case where the speaker’s frequency response is emphasizing the distortion in the audio signal.

To be continued… hopefully…

Using git config to fix settings and stuff

I am a bit of a git noob so I had to poke around a bit to figure out how to fix my user.email setting. Here are some snippets of useful git config commands and options to illustrate behavior.

Initialize empty git repo in dummy directory:


$ git init

Initialized empty Git repository in /home/mrmagoo/foogit/.git/

List all config items. These were created automatically when we executed the git init command because at some point in the past I had set them using git config --global --add:


$ git config -l

user.name=Mr Magoo
user.email=mr.magoo@mrmagoo.com
push.default=simple
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true

Remove the user.email global setting:


$ git config --global --unset user.email

$ git config -l

user.name=Mr Magoo
push.default=simple
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true

Re-add the user.email global setting but give it a different value this time:


$ git config --global --add user.email mr.magoo@gmail.com

$ git config -l

user.name=Mr Magoo
user.email=mr.magoo@gmail.com
push.default=simple
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true

Add a local user.email setting:


$ git config --add user.email mr.magoo@yahoo.com

$ git config -l

user.name=Mr Magoo
user.email=mr.magoo@gmail.com
push.default=simple
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
user.email=mr.magoo@yahoo.com

 

CUPS and network printing on Linux

CUPS and network printing on Ubuntu GNOME 16.04, to be specific. CUPS is an open-source printing system for Mac OS, Linux and UNIX which I don’t know much about yet but appears to be pretty widely used judging by my limited googling.

Via Ask Ubuntu, a CUPS web dashboard can be accessed via the URL http://localhost:631/

Continue reading “CUPS and network printing on Linux”

Resetting a Brother HL-5250DN printer to factory default settings

I have an old Brother HL-5250DN black and white laser printer that I found via Craigslist. I want to set up the printer as a network printer on my home network — the first step is to factory reset the printer so that I can regain access to the admin control panel!

Continue reading “Resetting a Brother HL-5250DN printer to factory default settings”