Category: Computer Tips

Find text string in file

I save a script named “findtext” that will look inside any file smaller than my maximum (avoiding searching huge binary file) #!/bin/bash maxFileSize=10M #don’t search inside huge binary files if [ $# -eq 1 ]; then srchText=$1 fDir=”.” fntmp=”*” elif [ $# -eq 2 ]; then fDir=$1 srchText=$2 fntmp=”*” elif [ $# -eq 3 ]; […]

Find Gmail email with any attachment e.g. PDF

You can see https://support.google.com/mail/answer/7190?hl=en for the types of advanced searches you can do with Gmail. For example, if I want to find all PDFs I sent to joe@yahoo.com, I type in Gmail search to:joe@yahoo.com filename:pdf or to find any email I sent to joe@yahoo.com with any attachment: to:joe@yahoo.com has:attachment

Ralink RT2800 Warning TX status “fix”

I have some of the ubiquitous USB Wifi sticks with a chipset using the Ralink rt2800 driver. I noticed that while it works fine, I got a lot of dmesg errors like: rt2800usb_txdone: Warning – Got TX status for an empty queue 2, dropping rt2800usb_entry_txstatus_timeout: Warning – TX status timeout for entry 14 in queue […]

Fixing SSH Access Denied for Github

Github suggests that you use the SSH Agent, but even that may not work when you have a lot of SSH keys. You need to setup your ~/.ssh/config file so that SSH to github.com uses the correct SSH Public Key the first time. Here’s how. nano ~/.ssh/config and add the lines Host github.com Hostname github.com […]

Restarting Unity desktop in Ubuntu

If your desktop seems to freeze for more than a few seconds, trying pressing together the keys Ctrl Alt F1 and then login with your username and password, and type unity & disown This will leave your desktop/apps all as they were while fixing the broken state. To just restart the whole Unity desktop (which […]

Updating BIOS in Gigabyte GA-Q87M-D2H to handle Haswell Refresh processor

This otherwise great motherboard is currently (June 2014) shipping with the F6 BIOS, which means the system acts almost completely dead if you have a Haswell Refresh (e.g. i7-4790) CPU installed. To make things more fun, my motherboard was NOT Qflash enabled, and I certainly don’t have Windows, so my only option was DOS flashing. […]

802.1x wireless WPA2-Enterprise without certificate: Ubuntu 14.04

NetworkManager in Ubuntu 14.04 has an issue with 802.1x networks that don’t require the laptop to have a .cert file. A bug report has been launched in regards to this. Note: the following discussion can subject your laptop to “man-in-the-middle” attacks by disregarding the need for a .cert file. However, if your network IT dept. […]

Matplotlib Python3: fixing pyplot.imshow()

I have noticed on my Ubuntu 14.04 PCs and have seen other OSs having issues with python3 and matplotlib.pyplot.imshow(). Errors like: backend_gtk3cairo.RendererGTK3Cairo … NotImplementedError: Surface.create_for_data: Not Implemented yet. and getting blank images. I fixed the problem by switching the matplotlib backend as follows: 1) placing a file named “matplotlibrc” in the directory of my Python […]

GoToMeeting.com Windows client under Wine / Linux

So far, the webcam doesn’t work, but the send/receive audio does work on a test call. I didn’t test receiving video. NOTE: in an actual conference, I wasn’t able to get sound, and so had to use a telephone. I have also seen problems with this for people using Windows and Mac at a large […]

Removing line numbers from text file

Suppose you want to reuse code from an OCR’d book or a text file, that has line numbers embedded in the file. For example say you had a file neat.py: 1 # cool program 2 import sys 3 def howneat(): 4 sys.exit(‘Thanks for visiting’) You can remove the line numbers by typing in Terminal: perl […]