Stop ksfetch / Keystone Fetch / Google Software Updater Network Requests on Mac

If you notice this process which seems to make network requests quite often you may wonder what the heck it is.

Apparently it is a Google software updater process. To me it seems to run much too frequently. I prefer to check for updates when I want to, not constantly every hour or whatever their default interval is.

It’s possible to uninstall this process to rid your system of these constant network requests.

From the terminal you can run the following to uninstall this process for all users:

/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/GoogleSoftwareUpdateAgent.app/Contents/Resources/install.py --uninstall

If you get the message “No such file or directory” the file name may be “ksinstall”

/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/GoogleSoftwareUpdateAgent.app/Contents/Resources/ksinstall --uninstall

After running this command the network requests should stop. Hopefully the process is not automatically put back from a future update.

If you still see the network requests occurring you can also try setting the update interval to 0.
Run this command in terminal to disable checking for updates.

defaults write com.google.Keystone.Agent checkInterval 0

More information can be found in this stack overflow thread.
And another good write up about disabling the Google Software Updater.

Daily Backup Sqlite3 Database Shell Script

Here’s a basic script to generate database backups for an Sqlite3 database.

Simply copying the .sqlite3 database file may work but there may be issues and data corruption if the database is locked or actively being used.

The better option is to use sqlite3’s built in .timeout and .backup utilities.

We also wanted to save the database file with the day of week included in it’s name.

The sqlite3 database backup shell script

#!/bin/bash

# Get the day of week
_dow="$(date +'%A')"

# open database, wait up to 20 seconds for any activity to end and create a backup file
sqlite3 /path/to/your/database.sqlite3 << EOF
.timeout 20000
.backup /path/to/your/production_${_dow}.sqlite3
EOF

Add execute permissions to the script.

$ chmod +x backup_db.sh

Schedule the backups to run automatically

Then we scheduled the script to run every day with cron.

crontab -e

This opens the crontab editor.

Add the following to the crontab file using the crontab editor:

#Run backup every day at 2:00 am
0 2 * * * /path/to/backup/script.sh

Save the file and run crontab – l to verify the job is saved.

crontab -l

Should return something like:

# m h  dom mon dow   command
0 2 * * * /path/to/your/script/backups/backup_db.sh

 

Bash One-liner to Make All File Names Lowercase

for f in *; do mv $f `echo $f | tr '[:upper:]' '[:lower:]'`; done

Source: bradchoate.com: Lowercase Filenames.

Services for Firefox

Services for Firefox.

Create a bootable installer for OS X Mavericks or Yosemite – Apple Support

Create a bootable installer for OS X Mavericks or Yosemite – Apple Support.

How to Add an Admin User to the WordPress Database via MySQL

How to Add an Admin User to the WordPress Database via MySQL.

Fix Miro 3.0 Ogg Conversion Quality

From the poster “Phil” on the Miro support forums…

In this directory/Terminal:
cd /Applications/Miro Video Converter.app/Contents/Resources/lib/python2.7/mvc
Edited this file:
open -e basicconverters.py

After these lines:
class OggTheora(converter.FFmpegConverterInfo):
media_type = ‘format’
extension = ‘ogv’
I replaced:
  parameters = ‘-f ogg -vcodec libtheora -acodec libvorbis -aq 10’
With:
   parameters = ‘-f ogg -vcodec libtheora -c:v libtheora -c:a libvorbis -q:v 4’

Then ran python -m compileall .  in that directory in Terminal.app.

Then I quit and re-started the Miro Video Converter.app … Now I get better quality OggTheora …
(I actually also replaced ffmpeg in the Helpers dir with my own binary, but I don’t think mattered, as I had the same problem until I changed the config.)

Ogg conversion very bad quality : Miro Video Converter.

 

An Illustrated Guide to Split Windows in Irssi

An Illustrated Guide to Split Windows in Irssi.

WordPress SalesForce Integration With Gravity Forms How To

Integrate Gravity Forms with SalesForce’s Web-To-Lead Service.

via WordPress SalesForce Integration With Gravity Forms How To.

Attaching image files to nodes programmatically in Drupal 7 – Stack Overflow

Attaching image files to nodes programmatically in Drupal 7 – Stack Overflow.

$filepath = drupal_realpath('misc/druplicon.png');// Create managed File object and associate with Image field.
  $file =(object) array('uid'=>1,'uri'=> $filepath,'filemime'=> file_get_mimetype($filepath),'status'=>1,);// We save the file to the root of the files directory.
  $file = file_copy($file,'public://');

  $node->field_image[LANGUAGE_NONE][0]=(array)$file;`