Monthly Archives: January 2013

Can’t install RMagick 2.13.1. Can’t find Magick-config for mac

brew install imagemagick

mdfind MagickWand.h

C_INCLUDE_PATH=/path/MagickWand.h gem install rmagick

Example:
C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/wand/MagickWand.h gem install rmagick

Might have to take these additional steps if you are using mountain lion.

http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion

It appears it’s a problem reported on the Homebrew github repo (https://github.com/mxcl/homebrew/issues/16625) blaming rmagick itself not supporting newer versions of imagemagick. On that same issue (https://github.com/mxcl/homebrew/issues/16625#issuecomment-11519383), you can find this link: https://coderwall.com/p/wnomjg which actually worked for me. This is what he does:

cd /usr/local/Cellar/imagemagick/6.8.0-10/lib
ln -s libMagick++-Q16.7.dylib libMagick++.dylib
ln -s libMagickCore-Q16.7.dylib libMagickCore.dylib
ln -s libMagickWand-Q16.7.dylib libMagickWand.dylib

Validating NPI – Luhn Algorithm

Sample NPI Number – 1295723567

Step 1 (take first 9 digits, last digit is check digit)
129572356 check digit 7

Step 2 prefix 80840
80840 129572356

Step 3 Double the value of alternate digits, beginning with the rightmost digit.
0 8 2 18 14 6 12

Step 4  Add the individual digits of products of doubling, plus unaffected digits.
unaffected digits – 5 2 5 2 0 8 8
doubled digits as individual digits 0 8 2 1 8 1 4 6 1 2
add them up 5 + 2 + 5 + 2 + 0 + 8 + 8 + 0 + 8 + 2 + 1 + 8 + 1 + 4 + 6 + 1 + 2  = 63

Step 5 Subtract from next higher number ending in zero.
next higher number = 70
70-63 = 7

Step 6 If the check digit is equal to the 10th digit in the NPI, then the given NPI is valid.
check digit is indeed 7

 

git push fails with insufficient permission message

Getting this error message during a git push?

Counting objects: 13, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (11/11), done.
error: insufficient permission for adding an object to repository database ./objects

fatal: failed to write object
error: pack-objects died of signal 13

This can be fixed by running the following.