Enthought Python Distribution (EPD) update via command line

Since the enpkg command doesn’t currently provide a good automatic way to update all your installed packages via command line, here’s a great way to update all the packages already installed in your Enthought Python Distribution (EPD) installation:

$epd_update

Run this command, after you have added this function code to your ~/.bash_profile, or in ~/.bashrc file:

function epd_update ()
{
    echo "[ Checking for epd package updates... ]"
    #-- display new packages
    sudo enpkg --whats-new
    #-- save new package list
    sudo enpkg --whats-new > /tmp/enpkgnew.txt
    #-- save only the first word after the "=====", it will be "no" if there are no new packages to be updated
    firstword=$(sed '1,2d' /tmp/enpkgnew.txt | awk 'NR>1{exit};1' | awk '{print $1}')
    if [ "$firstword" == "no" ]; then
        echo "[ No package updates available, exiting ]"
    else
        echo "[ Updating... ]"
        #-- space delimited list of the new packages
        newpacks=$(sed '1,2d' /tmp/enpkgnew.txt | awk '{print $1}' | tr "\n" " ")
        #-- update the new packages
        sudo enpkg $newpacks
    fi
}

It will either exit if there are no new packages, or will systematically install all new ones. Enjoy!

Use Tasker to automatically send email for missed phone calls or SMS texts

Use Tasker to automatically send email for missed phone calls or SMS texts:

UPDATE:

NOTE: this apparently only works with an unlocked screen (screen lock), since the Locale Execute Plug-in and Dpad (steps 2-4) cannot interact with the K9 program if the screen is locked!

Original post follows:


I wanted my mobile phone to send me an email message if I missed a phone call in case I didn’t hear it ringing. This is not the most elegant solution (using SL4A with a python script would be cleaner), but this is easier to setup.

NOTE: You can surely make another profile similarly for received SMS or MMS messages by in step “b”, replacing with Event→Phone→”Received Text”, and in step 1, for the variable names, use %SMSRF, %SMSRN %SMSRB, %MMSRS for sender address, name, body and subject respectively! Indeed, you can use this K9 mail method anytime you need to send yourself an email message from your phone.

Requires:

  1. Rooted Android phone
  2. Tasker
  3. K9
  4. Locale Execute Plug-in (but NOT the Locale application)

STEPS TO SETUP:
Note: FIRST install, run and configure K9 so it can properly send messages.

  1. New Profile, named: “Email If Miss Call”
  2. [trigger] Event → Phone → Missed Call
  3. New task, named: “Email Re Missed Call”

Steps in “Email Re Missed Call” task:

  1. Net → “Compose Email”
    • Recipient(s): username@gmail.com
    • Subject: Missed Cell Call: %CNAME %CNUM
    • Message: Missed call on cell Phone
  2. Plugin → Execute
    Configuration → Edit
    !input keyevent 82
  3. Input → Dpad
    • Button → Up
    • Repeat → 2
  4. Input → Dpad
    • Button → Press
    • Repeat → 1
  5. Display → “System Lock”

Notes about the above steps:

    • Replace with the email address you want to send to, and tweak the subject and message however you wish.
    • If you are using a gmail account, ensure that within K9 you Bcc yourself (Menu→Settings→Account Settings→Sending mail→Composition Defaults), otherwise the message will only show up in your “sent messages” and NOT your Inbox!
    • The %CNAME and %CNUM variables are built-in by Tasker for returning the missed call’s name and number.
    • Ensure that K9 and not some other mail program is associated with sending messages from Tasker!
  1. This is using the “Locale Execute Plug-in” to simulate pressing the “Menu” button on your phone. Type this in as shown. With my testing, the “!” is necessary to give it root privileges. Note: there is no “Enter” button when done typing, just press your phone’s back button when done editing.
  2. This uses Tasker’s Dpad ability to highlight the “Send” selection in K9’s popup Menu options.
  3. This uses Tasker’s Dpad ability to select “Send”.
  4. Optional: To turn the screen off when done sending. (K9 will exit when done.)

Enjoy!

Howto Toggle 3G and 4G on HTC Thunderbolt running CyanogenMod 7

This is something which took a long time for me to discover…

I’m running CyanogenMod 7 (or CM7, version 7.1.1, Android version 2.3.7) on a rooted HTC Thunderbolt (or TB mecha) on the Verizon network. 4G for me was not working, it was stuck in 3G mode.

Normally if you’d like to change the network setting in order to toggle between 3G and 4G, you either use something like the “Phone Info” or “LTE On/Off” apps, or dial *#*#4636#*#* on your phone, and then go to “Phone information” → “Set Preferred network type”

If you do this while running CM7, you will see one of the options as “Unknown” and there will not be any LTE options. Instead, you must use the ROM’s built-in access to this setting via:

Settings → Wireless & networks → Mobile Networks → Network Mode

From here you can set to 4G as “CDMA + LTE / EvDo“, or 3G as “EvDo only” to increase battery life.

Silence fitbitd console messages

I found Fitbitd (the Fitbit running daemon) sending tons of strings like this to console:

Aug/11/2011 14:57:32 	com.fitbit.fitbitd[351]	Thu Aug 11 14:57:32 mycomputer.local MacUserInterface[351] : [9A] 0x00, 0x3b, 0x61, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00
Aug/11/2011 14:57:32 	com.fitbit.fitbitd[351]	Thu Aug 11 14:57:32 mycomputer.local MacUserInterface[351] : [0A] 0x00, 0x01, 0x0a, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00
Aug/11/2011 14:57:32 	com.fitbit.fitbitd[351]	Thu Aug 11 14:57:32 mycomputer.local MacUserInterface[351] : [05] 0x00, 0x01, 0x05, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00
Aug/11/2011 14:57:32 	com.fitbit.fitbitd[351]	Thu Aug 11 14:57:32 mycomputer.local MacUserInterface[351] : Pending acks: 0
Aug/11/2011 14:57:32 	com.fitbit.fitbitd[351]	Thu Aug 11 14:57:32 mycomputer.local MacUserInterface[351] : [9B] 0x00, 0x3c, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
Aug/11/2011 14:57:32 	com.fitbit.fitbitd[351]	Thu Aug 11 14:57:32 mycomputer.local MacUserInterface[351] : Pending acks: 0
Aug/11/2011 14:57:32 	com.fitbit.fitbitd[351]	Thu Aug 11 14:57:32 mycomputer.local MacUserInterface[351] : Received logical packet.
Aug/11/2011 14:57:32 	com.fitbit.fitbitd[351]	Thu Aug 11 14:57:32 mycomputer.local MacUserInterface[351] : Received terminating status packet.

So, I silenced these by altering the top of /Library/LaunchDaemons/com.fitbit.fitbitd.plist
Note: the -e switch I obtained from:

fitbitd --help

from:

<key>Program</key>
<string>/usr/local/bin/fitbitd</string>

to:

<key>ProgramArguments</key>
   <array>
      <string>/usr/local/bin/fitbitd</string>
      <string>-e</string>
   </array>

Vemedio Snowtape RadioAgent

In Mac OS X (10.6 Snow Leopard), after closing Snowtape version 2.0.4, I see in Activity Monitor there is a service/process running named RadioAgent. In Snowtape under Preferences → Recording → “Enable automatic wakeup from sleep”, is NOT checked, and thus I expect all related processes to quit when I exit the program. However, this is their response to this:

This is intended behavior. The RadioAgent has a purpose. I won't go into any 
detail. If you kill the agent manually you might get unexpected behavior we can 
not support.

If you do want to stop or deactivate the RadioAgent (for example, you are trying to upgrade Snowtape and get the message “The operation can’t be completed because the item ‘RadioAgent’ is in use”.) is this the Terminal command to use:

launchctl remove com.vemedio.Snowtape.RadioAgent

Silencing Frigidaire mini in-window compact room Air Conditioner Model FAA065P7A

Instructions on Silencing Frigidaire Mini In-Window Compact Room Air Conditioner Model FAA065P7A – 6000 BTU MSII

If you look at reviews for this otherwise nice, small A/C unit, you’ll see lots of people complaining about a loud beep every time you press a button on the unit or the remote (e.g. changing fan speed or temperature). It’s a high pitched, noisy, piercing, annoyingly loud beep, which wakes spouses and babies. I know of no way to disable or turn off this “feature”. I looked for a wiring diagram and didn’t find anything promising, so I decided to slightly disassemble the unit and hope to find a speaker. I wound up fixing it and here’s how you can as well!:

Tools required:

  • Phillips screwdriver
  • Flathead screwdriver
  • Glue (I used a glue stick)

Time required: about 10-15 minutes

Skills required: Basic Handyman. Having said that, here’s my disclaimer: Only skilled, certified electricians should attempt to fix electronic equipment. These units may contain capacitors which hold electric charge. Do not touch any of the electronics. I am absolutely not responsible for loss of property or person, damage to this unit or your cat, accuracy of these instructions, nor do I guarantee that this will even work. Opening this unit may void the warranty.

Steps:

  1. UNPLUG THE UNIT!
  2. Swing open the front vent like you’re going to change/clean the filter and then gently and slowly swing open further to pop the two bottom hinges until it comes off. Set it and the filter aside.

    ( First swing open, then remove vent )

  3. Remove 3 large screws and set aside (be careful not to brush anything up against the fragile aluminum vents).

    ( Location of the 3 screws to be removed for removal of outer plastic ring )

  4. Remove 4 (there may only be 3) small screws around the control panel and set aside.

    ( Location of the 3 (or 4) small screws needed to remove the control panel )

  5. Pop off the outer plastic front piece which has the top vents attached. Do this by gently inserting a flathead screwdriver from the inside into the slot about half-way down on the right side until that side comes off. Repeat for the left side. Then, the trick is to try and gently pull this outer plastic piece up (there are two tabs along the top like there were on each side). Be careful as there is a wire which attaches this piece to the rest of the unit, so orient it so that you don’t put any tension on this wire.

    ( From along the inside, press tab with screwdriver to assist in removal of outer plastic ring )


    plastic ring removed

    ( Set plastic ring gently aside -- there's a wire connected to it )

  6. Remove 3 screws (there may only be 2) which were behind the control panel and set aside.

    ( 2 (or 3) screws to remove from electronics plate )

  7. Lift slightly (there are two hooks along the right edge) and carefully pull out this plate with attached electronics only far enough so that you can see and can just access to the small, black cylinder (about the size of an Altoid mint). This is the PCB mounted speaker.
    Top view of Speaker

    ( View of the hole to plug with glue (looking down) )

  8. Take your glue and make a small (about the size of a grain of rice) ball and place on the end of your flathead screwdriver.
  9. Carefully use the screwdriver to apply the glue ball to fill the hole which is at the center of this piece (don’t get glue on anything else). Be sure to pack enough in the hole to muffle the sound (about 2 grains of rice worth). You can also use an unfolded paperclip to help push the glue inside the hole and to damage the diaphragm which makes the noise.
  10. Now, carefully reassemble the unit in the reverse order.

NOTES:

  • I would not test your success until you have at least the two electronic panels securely screwed back into place.
  • For my three attempts at this, one now makes no beep, one left the beep barely audible and the other reduced the volume by half.
  • I did all this while my units were installed in windows.
  • If not obvious, this is basically irreversible.
  • This also works on model # FAA055P7A and may work on these model #s: FAA084P7A, FAC124P1A, FAA086P7A, FAA064P7A and FAC104P1A.

Good Luck!

Firefox, setup secure google search in quick search box

Google now has encrypted Google web search. Here’s how to enable it in the quick search box in Firefox:

Firefox search box

In Mac OS X, edit this file /Applications/Firefox.app/Contents/MacOS/searchplugins/google.xml, (on Windows you should find it at C:\Program Files\Mozilla Firefox\searchplugins\google.xml ). Go to the 7th line and add an ‘s’ after ‘http’, so that it looks like this when done editing.

<Url type="text/html" method="GET" template="https://www.google.com/search">

Save this file and relaunch Firefox.