OSX slow folder updates

May 28th, 2016 by EvilT

Has the process of populating your OSX El Capitan folders become very slow?

OSXDaily has a fix based on the original hashbang discovery.

 

The applications folder on my Mac recently (post 10.11.5 update) started taking 20 to 30 seconds to populate.

Deleting the files via:

rm ~/Library/Caches/CloudKit/CloudKitMetadata*

then force stopping cloudd in the Activity Monitor did the trick…

Harley 2003 FXDWG battery cross reference

March 12th, 2016 by EvilT

This is from a cross list from a cross battery so YMMV…

HD – OEM number per their website: Battery-65989-97C

YTX20HL-BS, YTX20HL, YTX20L-BS, YTX20L, GYZ20HL, FAYTX20L, FAYTX20HL, CYTX20L-BS, CYTX20HL-BS, PTX20L-BS, PTX20HL-BS, ES20LBS, XTA20HL, XTAX20HL, ETX20L, 4011496, YUAM720BH, YUAM320BS, YUAM420BS, PS01-352P

OSX Mavricks and El Capitan Trim Enable terminal command

October 3rd, 2015 by EvilT

Just so I can find it later… ;)

 

as root

#trimforce enable

Reboot and done!

Fly Web Lighted Fly Trap – Part Number for generic replacement fluorescent light bulb

August 30th, 2015 by EvilT

The Fly Web UV light with glue board is an excellent fly/gnat catcher for the garage.

 

However their replacement bulb (EL22) is a little expensive. The bulb they sell you is actually a generic 9w fluorescent bulb made by Match Lighting,

Part number: CFS 9w BL350

The generic can be found cheaper. Be warned however I’ve ordered 4 packs of these bulbs directly from China on Ebay and the ones I ordered would not work.

Strava Labs Heatmap

March 28th, 2015 by EvilT

So the people at Strava have built a really sweet heatmap.  You can see where Strava cyclists generally ride in a city. I can already see that a lot of the riding in Birmingham is at Oak Mountain, but I’m intrigued at how much riding is being done closer to town…

 

Link

How to mount a VirtualBox vdi image as a drive in linux

November 19th, 2013 by EvilT

#install tools
$ sudo apt-get install qemu-kvm

#load module
$ sudo modprobe nbd

#create loopback dev for the image
$ sudo qemu-nbd -c /dev/nbd0 <image>.vdi

#mount the partitions, that are exposed as /dev/nbd0pXXX
$ sudo mount  -o noatime,noexec /dev/nbd0p1  /tmp/vdi/

#in the end unmount && shutdown the ndb
$ sudo umount /tmp/vdi/
$ sudo qemu-nbd -d /dev/nbd0

I’m always looking up cron format so I put it here.

November 5th, 2013 by EvilT

Examples

1 0 * * *  printf > /var/log/apache/error_log

The following line makes the user program test.pl—ostensibly a Perl script—run every two hours, at midnight, 2am, 4am, 6am, 8am, and so on:

0 */2 * * *  /home/username/test.pl

Predefined scheduling definitions

Several special predefined values can substitute in the CRON expression. Note that in some uses of the CRON format there is also a seconds field at the beginning of the pattern (e.g., Quartz).

Entry Description Equivalent To
@yearly (or @annually) Run once a year at midnight in the morning of January 1 0 0 1 1 *
@monthly Run once a month at midnight in the morning of the first day of the month 0 0 1 * *
@weekly Run once a week at midnight in the morning of Sunday 0 0 * * 0
@daily Run once a day at midnight 0 0 * * *
@hourly Run once an hour at the beginning of the hour 0 * * * *
@reboot Run at startup @reboot
# *    *    *    *    *  command to execute
# ?    ?    ?    ?    ?
# ?    ?    ?    ?    ?
# ?    ?    ?    ?    ?
# ?    ?    ?    ?    ?????? day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names)
# ?    ?    ?    ??????????? month (1 - 12)
# ?    ?    ???????????????? day of month (1 - 31)
# ?    ????????????????????? hour (0 - 23)
# ?????????????????????????? min (0 - 59)

Format

Field name Mandatory? Allowed values Allowed special characters Remarks
Minutes Yes 0-59 * / , -
Hours Yes 0-23 * / , -
Day of month Yes 1-31 * / , - ? L W
Month Yes 1-12 or JAN-DEC * / , -
Day of week Yes 0-6 or SUN-SAT * / , - ? L #
Year No 1970–2099 * / , - This field is not supported in standard/default implementations.

In some uses of the CRON format there is also a seconds field at the beginning of the pattern. In that case, the CRON expression is a string comprising 6 or 7 fields.

Special characters

Support for each special character depends on specific distributions and versions of cron

Asterisk ( * )
The asterisk indicates that the cron expression matches for all values of the field. E.g., using an asterisk in the 4th field (month) indicates every month.
Slash ( / )
Slashes describe increments of ranges. For example 3-59/15 in the 1st field (minutes) indicate the third minute of the hour and every 15 minutes thereafter. The form “*/…” is equivalent to the form “first-last/…”, that is, an increment over the largest possible range of the field.
Percent ( % )
Percent-signs (%) in the command, unless escaped with backslash (\), are changed into newline characters, and all data after the first % are sent to the command as standard input.
Comma ( , )
Commas are used to separate items of a list. For example, using “MON,WED,FRI” in the 5th field (day of week) means Mondays, Wednesdays and Fridays.
Hyphen ( – )
Hyphens define ranges. For example, 2000-2010 indicates every year between 2000 and 2010 AD, inclusive.
L
‘L’ stands for “last”. When used in the day-of-week field, it allows you to specify constructs such as “the last Friday” (“5L”) of a given month. In the day-of-month field, it specifies the last day of the month.

Note: L is a non-standard character and exists only in some cron implementations (Quartz java scheduler)

W
The ‘W’ character is allowed for the day-of-month field. This character is used to specify the weekday (Monday-Friday) nearest the given day. As an example, if you were to specify “15W” as the value for the day-of-month field, the meaning is: “the nearest weekday to the 15th of the month.” So, if the 15th is a Saturday, the trigger fires on Friday the 14th. If the 15th is a Sunday, the trigger fires on Monday the 16th. If the 15th is a Tuesday, then it fires on Tuesday the 15th. However if you specify “1W” as the value for day-of-month, and the 1st is a Saturday, the trigger fires on Monday the 3rd, as it does not ‘jump’ over the boundary of a month’s days. The ‘W’ character can be specified only when the day-of-month is a single day, not a range or list of days.

Note: W is a non-standard character and exists only in some cron implementations (Quartz java scheduler)

Hash ( # )
‘#’ is allowed for the day-of-week field, and must be followed by a number between one and five. It allows you to specify constructs such as “the second Friday” of a given month.
Question mark ( ? )
Note: Question mark is a non-standard character and exists only in some cron implementations. It is used instead of ‘*’ for leaving either day-of-month or day-of-week blank.

Notes on building ZFS pools on linux

June 23rd, 2013 by EvilT

First off. The examples I’ve seen out there stating how to create a zfs pool on linux call for you to name the pool drives by their drive names (sdc, add, see, etc…) I would definitely recommend against this. If drives move in the system ZFS will not be able to identify those drives as part of it’s array. Use the device-id instead. You can see it by doing the following:
$ ls -lah /dev/disk/by-id/
you will get a list of device id’s followed by their common name. Always add these by their common name so if you get…

lrwxrwxrwx 1 root root  9 Aug 12 16:26 ata-ST3000DM001-9YN166_S1F0JK88 -> ../../sdc
lrwxrwxrwx 1 root root  9 Aug 12 16:26 ata-ST3000DM001-9YN166_S1F0JTW6 -> ../../sde
lrwxrwxrwx 1 root root  9 Aug 12 16:26 ata-ST3000DM001-9YN166_S1F0KBKY -> ../../sdd
lrwxrwxrwx 1 root root  9 Aug 12 16:26 ata-ST3000DM001-9YN166_S1F0KDEE -> ../../sdb

Then create your pool with
#zpool create -f mynewpool raidz ata-ST3000DM001-9YN166_S1F0JK88 ata-ST3000DM001-9YN166_S1F0JTW6 ata-ST3000DM001-9YN166_S1F0KBKY ata-ST3000DM001-9YN166_S1F0KBKY

There is of course an alternative (which is how I fixed my issue with the letters changing). If you create the pool above with
#zpool create -f mynewpool raidz sdb sdc sdd sde
you can always export and reimport the pool
#zpool export mynewpool
#zpool import mynewpool
And ifs will automatically pickup the real device-id’s. You would just need to remember to add that step just after you get the pool built.

I have a comment to an original post on how to zfs send/receive to move the data from your old zfs directories to the new ones.

An excellent reference for zfs on linux is here on Archlinux.org

And of course a link to the ZFS Admin Guide from Oracle

 

 

 

Matrix of most if not all Majestic fireplace inserts along with part numbers for each.

January 30th, 2013 by EvilT

Majestic Fireplace Matrix

Flashblock for Firefox

January 28th, 2013 by EvilT

Another excellent add-on for your browser. Flashblock will block those annoying flash advertisements, but will allow you to click through if there was something you actually wanted to see. It also comes in a Chrome version.

Just to reminisce, one of the big selling points for Android used to be Flash… ;)

Instruction manual for Cateye Cordless 7

January 6th, 2013 by EvilT

Since it’s easier to put it here than to find it every time I need it…

Manual for Cateye Cordless 7 bicycle computer.

Robots playing Motorhead’s Ace of Spades

January 6th, 2013 by EvilT

Ok, somebody had waaaay too much free time on their hands, but this is really funny. Robots playing Motorhead’s Ace of Spades…

Lifehacker provides some instruction on how to get a little privacy on the web…

December 29th, 2012 by EvilT

Everyone’s Trying to Track What You Do on the Web: Here’s How to Stop Them

I could not get the link to firefox to work, and Do Not Track Plus has changed its name to DoNotTrackMe, but the three primary addons (Adblock Plus, Ghostery, and DoNotTrackMe) are the same for Chrome and Firefox…

For Firefox, I added all through the firefox add-ons listing, then subscribed to Antisocial (after you have loaded the plugins above, clicking on the subscribe link from the antisocial page will automatically add it in your browser plug-in).

Cheap prepaid cell phone service – Tired of the big 4, use their service on other prepaid carriers…

November 3rd, 2012 by EvilT

So I’ve been researching ways to keep unlimited data in the new cellular world. Here are links to some articles on the subject.

Android central rings in on a couple of providers…
http://www.androidcentral.com/prepaid-not-just-burner-phones-anymore

And PC Magazine’s article on the 10 best cheap prepaid phone plans you’ve never heard of.
http://www.pcmag.com/article2/0,2817,2375644,00.asp

Using HDAT2 to fix 1TB drives used in ZFS pool. Drives show only 32mb available.

August 4th, 2012 by EvilT

Samsung HD103UI 1TB drive only reporting 32mb size. Walkthrough of the fix using HDAT2

Ok, so I’ve had a few of the Samsung Spinpoint F1 drives that have been dead because they report as only being 32mb in size. This appears to be due either to an incompatibility with some Intel chipset Gigabyte motherboards (from some reference info), or that I had them formatted as part of a zpool under Solaris ZFS. I’m not sure which, but whatever the cause I could not use them for anything larger than a good sized USB stick.

Well That’s all fixed now.

None of the The Seagate utilities package (Seagate bought Samsung drives a while back, so you cannot find Samsung utilities anymore) Seatools does not reset the Max size no matter what you do. After searching the net over and over I finally found a forum discussion with a link to a utility that fixed the issue. The program is called HDAT2, and it is available at hdat2.com.

Apparently the issue is that the for some reason the max address space for the current user is set to 65134 LBA sectors which translates to ~ 32 megabytes. If you look to the current native area it is 1953525168 which is one terabyte. Below you will find a pictorial howto for fixing this issue with HDAT2.

 

First download hdat2 and put on a CD, boot to the CD with the hard drive you want to fix plugged into the machine. the ISO for HDAT2 is self booting so no worries… :)

 

First you can see my drive with a capacity of 33.35MB

Now go and select your drive

In the next menu select “SET MAX (HPA) Menu”

Then select “Set Max Address”

Now scroll down to where it says “New User” and press S to set that value to the new user value.

After saying that ‘Y’es you want to do this you should see this

Now the home screen shows a full 1TB of Storage Goodness!

 

 

 

 

 

 

 

 

Oracle Solaris 11 Express and Link Aggregation.

July 4th, 2012 by EvilT

Note if you are not finding the following link aggregation commands, don’t worry they have just changed in Solaris 11 express.
     ipadm create-if  <has become> ipadm create-ip
     ipadm delete-if <has become> ipadm delete-ip

First things first.
Become root
Next you have to disable NWAM (Network Auto Magic) by:
# netadm enable -p ncp DefaultFixed   (you can reenable it later via: # netadm enable -p ncp Automatic)

I actually unplug the ethernet cables

 Find your physical ethernet devices:
# dladm show-phys

Make sure you don’t have any links:
# dladm show-links

You will have to fix DNS, smart things work after making the changes below, but Firefox and things that rely on basic DNS still don’t work. To Get DNS to work again you will need to do the following (Note DNS is
only partially working. I’ve found links saying I need to edit the
nsswitch.conf, however Oracle has made it a system updated file, so you
need to change the settings via svccfg.
if you cat /etc/nsswitch.conf and do not see hosts: and ipnodes: listed with files and dns, then perform the following…
# svccfg
svc:/network/dns/client:default> select name-service/switch
svc:/system/name-service/switch> setprop config/host = astring: “files dns”
svc:/system/name-service/switch> setprop config/ipnode = astring: “files dns”
svc:/system/name-service/switch> select system/name-service/switch:default
svc:/system/name-service/switch:default> refresh
svc:/system/name-service/switch:default> validate
svc:/system/name-service/switch:default>
# svcadm enable dns/client

#ipadm show-addr to see your actual address

If you cannot ping out do a ‘# netstat -r’ and look for a default route. If you do not see a default route then:
# route -p add default 192.168.1.1 (put your real gateway IP address here)
now a netstat -r should give you a default route. See if you can ping now.

If you can ping verify via ‘# dig slashdot.org’

I found some good DNS info on this site, And here is the Oracle Solaris 11 Site that tells howto for DNS configurations
Here is a site with a simple DNS verification procedure.

______________________________________________________________________________________
Problems with Oracle Solaris 11 Aggregate Link and VirtualBox
Some links:

  • http://docs.oracle.com/cd/E19082-01/819-6990/ggixp/index.html 
  • https://forums.virtualbox.org/viewtopic.php?f=11&t=47453&sid=20c9fc84fda5ea96fbc13451fd881ddd

After building the link aggregation VirtualBox will not be able to use the aggregated network adapter, so you need to build a virtual NIC with dladm. After the adapter is built go into each virtual machine and set it to use the new virtual adapter.
    # dladm create-vnic -l data-link vnic-name
    If the name of your aggregated NIC is agg0 and you want to build a virtual NIC called vnic0 then you would type the following
    # dladm create-vnic -l agg0 vnic0

Patent Reform (Software Style)

June 21st, 2012 by EvilT

The good people at the EFF are heading up an lobbying effort to reform the patent system. I personally believe that one of the big impediments to actually developing and building a product in this country is the legal overhead required to get anything done. A large part of this overhead is patent research and patent litigation.

If you are of a similar mind, just like the EFF, or have other reasons to believe that the patent system is desperately in need of an enema, please stop by and sign their petition.

Logitech Control Center for the Mac – OSX

May 19th, 2012 by EvilT

OK, so for some reason I keep forgetting this. The Mac OSX Logitech control center screws up everything on the Mac. I had just installed it again last weekend and my hot corners stopped working, sub-menus required me to hold down the left click to stay active, and the only way the screen saver would work was based on inactivity timeout.

In hot corner (set for screen saver) or in screen saver test in System Preferences, the screen saver will start for a second or two then stop and return you to the main screen. I played around with it for a week or so then remembered that the Logitech Control Center had caused this exact same issue under Leopard and Snow Leopard. Well seems as though it’s still not fixed. I tried the latest 3.51 this time and it still screwed up the screen saver. If you are having a similar issue go to your Applications-utilities folder and uninstall LCC (Logitech Control Center).

RootKeeper, Droid X2, Root, and the 1.3.418 update

May 12th, 2012 by EvilT

If someone out there has a Droid X2 that may be rooted and the cell provider is trying to push an update on you. Look in the market for an app called Voodoo OTA RootKeeper.

First you would tell it to ‘backup su’ (then a checkbox will be next to the line that says “Protected su copy available”). Then perform a temp un-root, Allow the update to install. When android says the update was successful, launch Voodoo OTA RootKeeper again and tell it to restore/reroot the phone.

Easy as pie…

Ahhhhhh… The smell of fresh science. Pielke introduces a new concept: Linking current events to climate change and the Bullshit button.

March 29th, 2012 by EvilT

Quoted from the Pielke Article:
The full IPCC Special Report on Extremes
is out today, and I have just gone through the sections in Chapter 4
that deal with disasters and climate change. Kudos to the IPCC — they
have gotten the issue just about right, where “right” means that the
report accurately reflects the academic literature on this topic. Over
time good science will win out over the rest — sometimes it just takes a
little while.

A few quotable quotes from the report (from Chapter 4):

  • “There is medium evidence and high agreement that long-term trends
    in normalized losses have not been attributed to natural or
    anthropogenic climate change”
  • “The statement about the absence of trends in impacts attributable
    to natural or anthropogenic climate change holds for tropical and
    extratropical storms and tornados”
  • “The absence of an attributable climate change signal in losses also holds for flood losses”

This quote, however fun it is, does not give you enough info to play with…

Please read the entire article here

Then when done have fun with the rest of his blog… ;)