How to Fix App “is damaged and can’t be opened. You should move it to the Trash” Error on Mac

By: clcbio.com

Mac OS Sierra 10.12.x

The premise is the same as shown for Mac OS 10.9.2 through 10.11.x except that the steps to enable the “Anywhere” option are different.

If you view your security settings under System Preferences | Security & Privacy, you will see there is no Anywhere option.

To enable the “Anywhere” option, run the following command in a terminal:

sudo spctl --master-disable

If you go back to System Preferences | Security & Privacy, you will see the Anywhere option enabled. Unlock the edit option by clicking on the padlock icon at the bottom of the window to change to Anywhere option.

At this point, you should be able to install the software.

This security setting affects your whole system. To reinstate the earlier security policy, run the following after the software is installed:

sudo spctl --master-enable

and then check your security settings are as you expect.

Copy from: https://secure.clcbio.com/helpspot/index.php?pg=kb.page&id=323

How to use sudo with Touch ID on your Mac

By: Cabel (Twitter: @cabel)

How to enable Touch ID for sudo commands on your MacBook Pro with Touch Bar

  1. In Safari, paste the following into the search bar: file:///etc/pam.d/sudo.

    Alternatively, you can edit the file within the Terminal app itself using command-line text editors like emacs or nano; if you choose to do this, go to step 8, and skip steps 10-12.

  2. Press Command-I with the sudo file highlighted to open up the information screen.

  3. Click on the Lock icon in the bottom right corner.
  4. Enter your authentication information (or use Touch ID).
  5. Change the privileges of all users to Read & Write.

  6. Download TextWrangler, a free plain text editor, or use the plain text editor of your choice.
  7. Open the sudo file in TextWrangler (or equivalent).
  8. Paste auth sufficient pam_tid.so on line 2 of the document (underneath the initial comment line)

    Note: If you get a note about the document being locked, go back to step 2-5 and make sure you’ve enabled Read & Write privileges on the document.

  9. Save the sudo file and close it.

  10. In Finder, press Command-I with the sudo file highlighted to open up the information screen.
  11. Change the privileges on all users to Read only.
  12. Click on the Lock icon in the bottom right corner.

Now, when you open Terminal and attempt a sudo command, you should be prompted with a Touch ID authentication in lieu of entering your administrator password.

Copy from: https://www.imore.com/how-use-sudo-your-mac-touch-id

Khmer Unicode NiDA Keyboard for Mac

By Cambosastra Admin

How to Set up Khmer Unicode NiDA Keyboard for Mac:

Image

  • Go to System Preferences > International (or Language & Text for Snow Leopard) pane
  • Select “Input Sources” tab and desired Khmer Keyboard
    Image
  • CLOSE System Preferences. You may need to reboot the computer for Keyboard to take effect.
  • In both keyboards, if the CAPS lock is depressed, the output will be as a standard English keyboard.

Copy from: http://www.cambosastra.org/khmer-unicode-nida-keyboard-for-mac/

Download: https://drive.google.com/file/d/1L-_1AVAhkPYqtdizKTdhaMhWA-RMBETC/view?usp=sharing

Make Shared Partition between Mac OSX and Windows (Bootcamp)

Here is a quick step by step of what I did:

Install OS X on a single partition hard drive.
Run Bootcamp Assistant.
Download drivers for Mac and burn to CD.
Make 60GB Bootcamp partition for Windows.
When prompted for install disc, STOP installation and quit Bootcamp.
Launch Disk Utility. Look at the 2 partitions.
Shrink Mac OS X partition to 100GB.
Click on + to create a 3rd partition in free space.
Split that partition into however many other partitions you want.
Quit Disk Utility.
Insert Windows 7 installer DVD and restart Mac.
After the startup chime, hold down OPTION key.
Wait a while until the Windows 7 DVD appears and select it.
Mac should start up from DVD. Start installing Windows 7.
Continue until finished. DO NOT connect to internet.
Load Bootcamp drivers CD that you burned and install.
When finished, restart and log into Windows 7.
Continue installing your applications. Do activations.
When finished, restart, holding down the OPTION key.
You are done. You should now see your OS X Lion and Win 7 partitions.

 

***Notation for Macbook Pro early or late 2011, you must install bootcamp from build-in DVD drive.

If you found error like: “Drivers not found bootcamp” pleas go to enable check on bootcamp to install vai USB drive.

Right click on bootcamp in /Application/Utility -> Show Package Contents -> Contents -> open file called Info.plist

and find and add Model Identity and Model Name

<key>DARequiredROMVersions</key>
<array>
<string>MBP81.0047.B04</string>

….

<key>USBBootSupportedModels</key>
<array>
<string>MacBookPro8,1</string>

Installing the PHP mcrypt extension on OSX 10.9

By:  Jens segers on Nov 05 2013

The following steps will explain you how to install the mcrypt extension for the default PHP version (5.4.24) that is shipped with OSX Mavericks. You need this extension for stuff like Laravel and phpMyAdmin. Otherwise you will get this error:

Mcrypt PHP extension required.

Step 1: Install autoconf and mcrypt

I used homebrew to install autoconf and mcrypt, which is as easy as:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

 

brew install autoconf mcrypt

If this does not work for you, or you don’t want to use homebrew, then check out this tutorial.

Step 2: Build the PHP extension

To build the PHP extension you will need the PHP 5.4.17 source code that is available for download here and extract it:

cd ~/Downloads
unzip PHP-5.4.17.zip

Then build the extension using the following commands:

cd php-src-PHP-5.4.17/ext/mcrypt/
/usr/bin/phpize
./configure
make
sudo make install

Step 3: Enable the extension

All that is left is to enable the extension by editing /etc/php.ini. If this file is not present, copy /etc/php.ini.default and rename it:

sudo cp /etc/php.ini.default /etc/php.ini

Edit the /etc/php.ini file and add the following:

extension=mcrypt.so

Step 4: Restart apache

Now just restart apache and you’re done!

sudo apachectl restart

 

Copy from: http://jenssegers.be/blog/49/installing-the-php-mcrypt-extension-on-osx-10-9 and

Windows detects GPT disk as MBR in EFI boot

This disk is OCZ VERTEX 128GB SSD. It is formatted as GPT from OSX. The disk layout is,

/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *128.0 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                 Apple_RAID                         63.8 GB    disk1s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk1s3
   4:       Microsoft Basic Data ssdwin                  63.9 GB    disk1s4

I’m trying to install windows7 in the “ssdwin” partition but when i EFI Boot windows 7 64bit USB installer, it says,

Windows cannot be installed to this disk. The selected disk has a mbr partition table, On EFI system window can only be installed to GPT disks.

Did you happen to use Apple’s Disk Utility to create a FAT filesystem in that to-be-Windows partition? If so, you converted the disk from a legal GPT disk into a hybrid MBR disk, which OS X sees as GPT and Windows sees as MBR. The solution in this case is to clear the hybrid MBR data. A number of utilities can do this. I’ll describe how to do it with my own GPT fdisk (gdisk) utility:

  1. Download GPT fdisk from its Sourceforge page and install it. (Versions are available for Linux, OS X, and Windows. I’ll assume you’ll do this from OS X.) Alternatively, you could run it from a Linux emergency disc like Parted Magic.
  2. Launch gdisk on your disk by typing sudo gdisk /dev/disk1 in a Terminal window. (Change the device identifier if it’s not as you presented earlier or if you use another OS for the job.)
  3. Type p to view the partition table to verify you’re working on the correct disk. If not, type q to quit without saving your changes and try again with another device.
  4. Type x to enter the experts’ menu.
  5. Type n to create a fresh protective MBR. Note that gdisk won’t confirm a change; it’ll just show you a new experts’ prompt.
  6. Type w to save your changes. You’ll be asked to confirm this action. Do so.

With any luck this will fix the problem. If it doesn’t, though, you can use gdisk‘s v option (on any menu) to have gdisk look for partition table problems. It can fix some minor problems automatically, but other times you’ll need to make explicit changes. See the GPT fdisk documentation on GPT repairs for details.

http://superuser.com/questions/508026/windows-detects-gpt-disk-as-mbr-in-efi-boot

Getting an Android SD Card Image to work on Mac OS X

By Tetchro

hen I began experimenting with Android development one of the first hurdles I encountered was trying to get the emulator to recognize a fake sd card so that I could reference it in the emulator. There doesn’t seem to be a whole lot of resources out there for doing this on Mac OS X (at least that I could find, but usually I can’t find anything on the internet so what do I know?), so after finally figuring it out with the help of a few different websites, I thought I’d post it here for any one else struggling and also for my own reference in case I ever need to do it again! I’ll keep the steps as simple as possible after the initial step (getting Eclipse installed and all that jazz). Basically, we just want to create an .iso file and get Eclipse to recognize that it exists:

  1. Obviously, install Eclipse, the SDK, and the ADT plugin package on your Mac… here’s a link to instructions on how to do this. It should be pretty straightforward, although I found the Android Developer’s website a little confusing to navigate.
    http://developer.android.com/sdk/installing.html
  2. Once you run Eclipse and get everything set up, you should have a workspace (by default I believe it ends up in your Documents folder. So in my case, since my username is Riley, the /Users/Riley/Documents/workspace directory). We’ll use this to store our sd card (you don’t have to though… you can put it anywhere you’d like! My examples that follow use this directory)
  3. Open up Terminal (it’s in Applications -> Utilities -> Terminal for those of you who have lived sheltered lives!)
  4. The first thing you want to do it navigate to the “tools” folder inside the sdk folder you downloaded from the Android developers website. In my case, the folder is called “android-sdk-macosx” (I saw some examples with different names, so I just wanted to be clear here) and it’s located on my desktop. So in my case, I would write into terminal:
    cd /Users/Riley/Desktop/android-sdk-macosx/tools

    So, basically,

    cd [directory of sdk tools folder]

    That should be simple enough if you know where you put the folder!

  5. Next, you want to create an .iso file in your workspace directory. In my case, I wanted a 1gb (1024 mb) “fake” sdcard to play with, so I typed into Terminal:
    ./mksdcard 1024M /Users/Riley/Documents/workspace/sdcard1.iso

    This runs an application called mksdcard in the tools folder we navigated to before and creates a 1024 mb .iso file in the directory /Users/Riley/Documents/workspace/sdcard1.iso. I named my sdcard “sdcard1.iso,” but you can give it a different name, of course. The basic command of this structure is:

    ./mksdcard [size] [name and location of file to be created]

    Both of the terminal commands. Now the sdcard1.iso exists!

    If you just type “./mksdcard 1024M sdcard1.iso” it will create “sdcard1.iso” in the tools folder in the sdk.Here’s a link to some more information about mksdcard from the Android Developer website. The minimum size of the sdcard image is 9 mb, and the maximum size is 1023 gb (pretty generous!).

  6. Next, find your “sdcard1.iso” (or whatever you named it) file and double-click it. This will mount the image under “devices,” which can be found in finder under the name “SDCARD”. To stick some stuff on it (in the picture I put a few audio files on there. Android, when you first run the emulator from Eclipse, creates the “Android” and “LOST.DIR” folders automatically) just drag and drop as you would with a normal USB drive. 

    The newly created sdcard1.iso can be found in Finder under “Devices” with the name SDCARD.

  7. Fire up Eclipse and navigate to the project you want to use the sdcard in.
  8. Go to Run -> Debug Configurations
  9. Click the “Target” tab on the right side of the window that pops up, and find the “Additional Emulator Command Line Options” textbox. When you first open this window, YOU MAY NEED TO SCROLL DOWN IN THE FRAME TO SEE THIS BOX. To make life easier for yourself, you can also simply expand the “Debug Configurations” window, and the textbox at the bottom should appear. I mention this because I was an idiot and didn’t realize I had to scroll down at first and thought I was in the wrong place. :P
  10. Type in “-sdcard [directory of sdcard1.iso]” (without the quotes, as seen in the image below). In my case, I wrote:
    -sdcard /Users/Riley/Documents/workspace/sdcard1.iso
  11. Click “Apply”. This also updates the “Run Configurations” settings (also available under the “Run” menu), so you don’t need to alter those. 

    Debug configurations altered to include the sdcard1.iso image.

  12. You should now be able to access the (fake) sdcard by using the directory /sdcard/
    As for where you go now, that’s up to you!

I can try to answer any questions if you run into problems, but hopefully this offers some help for any one that was confused about this whole process. Good luck!

 

Copy from: http://www.lagserv.net/wp/2012/04/tutorial-getting-an-android-sd-card-image-to-work-on-mac-os-x/