顯示具有 Mac 標籤的文章。 顯示所有文章
顯示具有 Mac 標籤的文章。 顯示所有文章

2017/07/13

Make ringtone on iTune 12/ macOS

medium-cover
mac is so easy to use, now-a-day only if you paid.

Just now I want to make a ring tone for my own theme song originally from "Flash Gordon" movie.  And learned that it's not easy at all. Like Apple folk, not gonna stop there, after a couple digging, here's how to do it.




Needed Software/ Environment
  • environment: macOS Sierra/ iTune 12.6
  • Get ffmpeg binary if you don't have it yet.
    brew install ffmpeg
Steps
  1. Cut the tune use iTune. Make it 30 second or less.
  2. Phone is in iOS 11 and supported ring tone is in m4r extension of aac codec. Here's ffmpeg command to convert mp3 to m4r:
    ffmpeg -i the_song.mp3 -ac 1 -ab 128000 -f mp4 -c:a aac -y the_song.m4r
  3. To add the newly generated m4r tone, simply double-click it and it should in the Tones library in iTune.
  4. Connect phone to the mac and sync it.
  5. On the phone, the new tone is listed. Pick it and set it.
Finally, don't forget to un-set the option in iTune.

2016/09/22

MacOS Sierra and ssh public key

If ssh dsa key is used for password-less access to other boxes, it won't work in MacOS Sierra anymore.  It's because:

The problem is that DSA keys are obsolete after OpenSSH 7.0, which the new system seems to use. I generated a new RSA key and things worked again. Also, in the process I found out that the authorized_keys2 file has been actually deprecated for a long time! So I advice everybody to use authorized_keys instead, which works both with protocols 1 and 2. That way Apple's original sshd_config will work as is. 

https://forums.developer.apple.com/thread/48794

So be sure to redo your key in rsa before (or after) the OS upgrade.

2016/07/27

Phidgets 1048 on OSX

I got the Phidgets 1048 temperature sensor to hookup Roastmaster app and Quest m3s roaster.

The plan is exactly like Raintroy suggested. You would install the old OSX driver (2.1.7.20140227) on a mac. The board is powered by the computer via USB.  The iPad is connected to the same wifi as the mac.  From there, Roastmaster app can read from the sensor via web service.

Using a 2 years old driver doesn't sound to exciting to me.  And yes, it bring trouble to the setup.  As you complete the driver install, the testing program would show Attached: Nothing.

To fix the bug, you need to make sure:

1. Install latest phidgets driver (and than override it by install the old driver required by Roastmaster)
2. Make sure Java using mac's original:

$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-468-11M4833)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-468, mixed mode)

Both Apple and JDK have the instruction:

Hopefully the info helps if you have the same problem.

Other references:
Phidgets OSX doc:
http://www.phidgets.com/docs/OS_-_OS_X#Quick_Downloads

2013/10/24

SVN 1.8 on OSX 10.9 (Mavericks)

This post is about how to compile the latest SVN source (1.8.3) on OSX Mavericks (OSX 10.9).

References

Sam's Updating to SVN 1.8 for Mac OSX 10.8. This is about building in OSX 10.8.

Requirement

  1. Xcode command line tool: can be download at Apple's dev center or install command line tool without Xcode.
  2. Setup the Tool chain: sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain The key is to link the toolchain to reflect new version # of Maverick, which is 10.9.
  3. The SVN source: can be download form Apache SVN project.
    Here's straight way in command: cd ~/Downloads/ curl -o subversion-1.8.3.tar.gz http://archive.apache.org/dist/subversion/subversion-1.8.3.tar.gz tar -xvf subversion-1.8.3.tar.gz

Build and Install SVN

Build serf

First we will need to build serf, included in the subversion package. cd ~/Downloads/subversion-1.8.3 sh get-deps.sh serf cd serf/ ./configure make sudo make install

Build SVN

Go back up to the SVN source root, and build it using serf. Depend on your hardware, it might takes awhile. If you need a coffee, this is good time to do so once you start the make. cd .. ./configure --prefix=/usr/local --with-serf=/usr/local/serf make sudo make install

Wrap it up

Now you've the new SVN 1.8.3 installed at /usr/local/bin. Make sure your path includes it. From there you should able to: svn --version And here you go:
svn, version 1.8.3 (r1516576)
   compiled Oct 24 2013, 02:38:35 on x86_64-apple-darwin13.0.0

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - using serf 1.2.1
  - handles 'http' scheme
  - handles 'https' scheme

2011/08/26

Install BootCamp 4.0

If you upgrade to Lion from Snow Leopard + Win7 bootcamp, you might find that you can't download new bootcamp 4.0 from Bootcamp Assistant. The way I go around it is by downloading it from Apple's CDN:
  1. Download Bootcamp 4.0 Drivers, here's a link on some Apple CDN for the .pkg file containing the drivers (603MB): http://bit.fosk.it/bootcamp40
  2. Open this file with 7Zip in Windows, and go through a few layers to extract BootCampESD.pkg\Payload\Payload~\.\Library\Application Support\BootCamp\WindowsSupport.dmg\0.Apple_ISO
  3. Rename the file from 0.Apple_ISO to BootCamp4.iso
  4. Extract the iso with 7Zip to a folder.
  5. Open command prompt and navigate to the extracted folder, for example:
    E:
    cd WindowsSupport\Drivers\Apple
  6. From the prompt in that folder, run msiexec /i BootCamp64.msi

2011/03/12

Fix backspace/delete when ssh'ing into Linux machines

the solution is very simple now-the-day. Just go to Terminal's preference, settings, advanced, and check the "Delete sends Ctrl-H".

There's no need to modify .tcshrc what so ever..

2011/02/12

Mac: Print screen key






Windows 鍵

Mac 鍵

用途



Alt

Option

輸入特殊字元,如 é。



Control

Command (⌘)

執行動作或快速鍵。例如,按下 ⌘ + S,通常會儲存文件或檔案。



Num Lock

Num Lock

Shift + Clear

在某些應用程式中,控制是否按下數字鍵盤的按鍵來輸入數字或移動游標。



Scoll Lock

Control + F14

在某些應用程式中,控制是否按下方向鍵來移動游標或在視窗中捲視。



Print Screen

⌘ + Shift + 3
⌘ + Shift + 4

拍攝螢幕照片。⌘ + Shift + 3 會擷取整個螢幕的畫面。⌘ + Shift + 4 會擷取您螢幕所選區域的畫面。


On Windows 7, use those combo keys:
Shift + Fn + F11: Print Screen
Alt + Shift + Fn + F11: Print Active Window

http://docs.info.apple.com/article.html?path=Mac/10.5/yh/cdb_winkeys.html

2011/01/14

Snow Leopard - clean up MySQL installation

For whatever reason you need to reinstall/ clean MySQL. Here are the spots:

sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQLStartupItem.pkg/
sudo rm -rf /var/db/receipts/com.mysql.mysql*
sudo rm -rf /var/db/receipts/com.mysql.mysqlstartup*


edit /etc/hostconfig and remove the line MYSQLCOM=-YES-

Launchctl
launchctl list|grep mysql


remove anything found.

2010/08/03

Snow Leopard's NTFS read/write support

http://tool-box.info/blog/archives/1193-Snow-Leopards-NTFS-readwrite-support.html

This still stands for release version of Snow Leopard. It also works for USB disk.

update: 2010/8/6:
I switch back for NTFS-3G, the Apple built-in version is not stable and screw up my partition table. Apple did not enable it for a reason...

2010/03/12

iPhone: Internet Tethering option is gone!?

If it happens to you, on the phone, navigate to help.BenM.at, follow the instruction to reinstall carrier profile.

This works 3G, 3GS, OS version 3.1 or up, no need to jail-break.

2010/01/18

MacBook Pro - Very Poor Volume Output FIXED!

If your bootcamp windows is having very poor volume output on 2009 unibody MacBook Pro, here's the solution: http://www.stuffedcow.net/macbook_audio. Thank you, Henry.

I follow the instruction below, plus a reboot, and fixed the problem:
  1. Download and unzip this package: CirrusAudioXP_Macbook_c.zip 1.0.0.13c (Nov. 1, 2009).
  2. In Device Manager, Update Driver for the Cirrus Logic High Definition Audio device. Don't let Windows search for or do anything automatically. Manually choose to the driver from a list, and use the "Have Disk..." button.
  3. Reboot.
My configuration is latest 13" MBP (MB990LL/A), bootcamp 3.0 from Snow Leopard, and latest Windows 7 (build 7600).

The detail discussion can be viewed here: http://discussions.apple.com/thread.jspa?threadID=2037093&start=449

2009/09/20

Prevent .DS_Store file creation over network connections

1. Open the Terminal application from the Utilities folder which is nested in the Applications folder

2. In the newly opened terminal type:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

3. Restart the computer for the change to take effect

Reference: http://support.apple.com/kb/HT1629

2009/09/19

VMware Fusion - remove "Bootcamp partition" from Virtual Machine Library List

The boot camp VM is broken because missing files. How do you redo it all?

It's extremely annoying that one cannot remove the Boot Camp partition entry on the Virtual Machine Library without going through some hoops and jumps...

If you do the following this will stop the Boot Camp partition entry from showing on the Virtual Machine Library...

1. Close Fusion

2. In a Terminal (/Applications/Utilities/Terminal) copy and paste the following command, as is, and then press Enter and type in your password then press Enter.

sudo mv "/Library/Application Support/VMware Fusion/vmware-rawdiskCreator" "/Library/Application Support/VMware Fusion/vmware-rawdiskCreator.bak"


3. Open Fusion and then ctrl-click the Boot Camp partition entry on the Virtual Machine Library and select Delete.

Note: If you have Imported the Boot Camp partition as a normal file based Virtual Machine you could have a Boot Camp partition entry on the Virtual Machine Library that you do not want to delete so before deleting the Boot Camp partition entry on the Virtual Machine Library you can ctrl-click the Boot Camp partition entry on the Virtual Machine Library and select Show in Finder and then make sure this is the one in your "/Users/${USER}/Library/Application Support/VMware Fusion/Virtual Machines/Boot Camp" folder before removing it from the Virtual Machine Library.

To restore the Boot Camp partition entry on the Virtual Machine Library...


1. Close Fusion

2. In a Terminal (/Applications/Utilities/Terminal) copy and paste the following command, as is, and then press Enter and type in your password then press Enter.

sudo mv "/Library/Application Support/VMware Fusion/vmware-rawdiskCreator.bak" "/Library/Application Support/VMware Fusion/vmware-rawdiskCreator"

Reference: http://communities.vmware.com/thread/200649

2009/09/06

How to reset su password in snow leopard

In 10.5.x or earlier version of OSX, you use Directory Utility to enable root user and reset its password. In Snow Leopard, the utility is removed under the Application/Utility folder. So what do you do?

sudo passwd

Alternately, you can navigate to /System/Library/CoreServices/Directory Utility.app to do it in the old way.

How-To: Recursively remove .svn folders

Moved from windows to mac, the old "D drive" staff need a bit of re-org. One big trouble I found is that OSX doesn't deal with file start with "dot" well. For example, the ".svn" folders.

So how to get rid of these? On any *nix machine (Mac included) you can run the following command:

rm -rf 'find . -type d -name .svn'

2009/08/31

MacBook Pro - share internet connection with Windows PDA via Bluetooth

To share 3G connection from PDA to MacBook, here's the steps:

1. Turn on Bluetooth on both devices (MBP and PDA)
2. Pair up (if you're not yet done it)
3. Start the internet sharing program on PDA
4. On MBP, click on the bluetooth icon on the menu bar (assuming you have it on the menu bar), under your PDA device, select "Connect".
5. Happy browsing.

My working device is: MBP 990 (OSX 10.5.8), HTC Curise (WM 6.1).

Mercury簡易改裝

有同好有一樣的困擾 - 如何使用自己的data logging軟體,因此寫了這篇來分享我的簡易改裝。 Background 雲豆子 MERCURY roaster 烘豆機的設計是使用自行開發的軟體,來:1. 操控風門/火力; 2. data logging/自動烘焙。 ...