Make ringtone on iTune 12/ macOS

medium-covermac 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.

廣告

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.

Phidgets 1048 on OSX

update: 2017/07/05
After update macos to high sierra, phigets driver needs to be reinstalled.
With latest version of Roastmaster, you can use latest Phigets driver.

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

El Capitan & Homebrew

El Capitan just released. And surely we need to take care the upgrade for Homebrew. Check this out if you’re not familiar with it.

Here’s the upgrade steps:

  1. update xcode to 7.0.1
  2. install command line tool
xcode-select --install
  1. fix /usr/local permission
sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local
  1. run update & upgrades
    brew update
    brew upgrade
    brew cask update
    brew doctor
    brew cleanup
    brew cask cleanup
    

Reference:

OSX Yosemite, NTFS Read & Write

Upgrade to Yosemite will break NTFS R&W. Here’s how to redo it:

Requirement

  • brew
  • brew cask

if you don’t know or don’t have brew, check this out: dotfiles

Installation

1. Install a binary osxfuse package from Homebrew Cask:

brew cask install osxfuse

2. Install ntfs-3g:

brew install ntfs-3g

3. Symlink to correct version of mount_ntfs:

sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.original
sudo ln -s /usr/local/sbin/mount_ntfs /sbin/mount_ntfs

4. Remount the NTFS drive and it will work!

2010 27" iMac 換硬碟

如果用了幾年的電腦突然變慢,開機時間越來越久,大部分是硬碟出了問題。你若不理它,再過不久硬碟開始有聲音。過一陣子你重開機可能就開不起來,你只好送修去換個新硬碟。舊硬碟掛上去,裡面資料運氣不好就會二二六六,要花大錢才能完整救回來。

所以當你嫌電腦太慢或有上述異常狀況,最好換換。裝系統的硬碟要換就要換成SSD的。換完後,這台電腦你會覺的比當初新買時還快。

iMac由於是一體成形,很多人連拆都無從下手。如果你常DIY,拆一般機殼PC都沒問題,其實不會很困難。

若你不想自己動手,可詢問三重的華安電腦,看來很專業且價格公道 (連工帶料NT$2000,含硬碟架及原DVD外接殼,硬碟需自備)。

可惜我看到資訊時已開始動手了,目標是舊1TB硬碟換成SSD.參考資訊如下:

準備工具

  1. 六角的T10螺絲起子
  2. 吸盤:imac的螢幕板其實是用強力磁鐵吸住。隨便用一個手機的車座吸盤就可吸開。不用特別買吸盤。
  3. 大支的迴紋針:這是要把螢幕拉起來的。我沒迴紋針,用硬點的文具鐵尺就可以。
  4. 吸塵器或空氣噴:很多電腦掛掉都是因為日積月累的灰造成過熱。難得打開,一定要順手清乾淨。不良例子請看這篇。最好保持習慣,每年大掃除時也清電腦。
  5. 螢幕清潔組:我是用這個
  6. 雙面膠:用來固定SSD碟。

SSD硬碟:所換的SSD是美光m550 256G.之前另一台用美光m4,快兩年了,非常好,CP值很高。

開工註記

大部份的參考資訊都是要換成雙硬碟,因此除上列工具外,還需要準備SATA電源線1公對2母,及新的一條SATA線。且要拆到主機板可拿出來裝SATA線。

大容量的需求我已外接硬碟,就懶的拆了。

由於我要做的很簡單(只換原有硬碟),follow這篇,步驟0跳過,執行步驟1,2,第3步用10公分文具鐵尺拉上螢幕,把第一條線解開,然後就像車的引擎蓋,用鐵尺頂住,即足夠換掉硬碟。

總共約花了40分鐘。其中大部分時間都是在打掃,跟把螢幕擦乾淨。

風扇控制

iMac硬碟有接上風扇控制,但SSD沒有此接頭(所有原風扇控制線沒接上)。因此換完後ssd後風扇會狂轉不會停。

你只要裝這個app就搞定了:http://exirion.net/ssdfanctrl/
這裡有中文說明:解決iMac換裝SSD後風扇狂轉 – SSDFanControl

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.xctoolchainThe 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