OS X fonts look different on external Monitor

When the Macbook Pro connects to an external LCD monitor, fonts look very strange in some program  (Like Terminal) on the external monitor. It happened on 2015 Macbook Pro w/ OS X El Capitan 10.11.6.  Monitor AOC E2429SWHE.

It appears the fonts on an external monitor are not smoothing because system mistakenly recognizes the monitor as CRT.

To solve: In Terminal

defaults -currentHost write -globalDomain AppleFontSmoothing -int 2

The number 2 here corresponds to Medium – Best for Flat Panel. You may also use 1 for light smoothing, and 3 for strong smoothing, as per the original OS X font smoothing options.

Relaunch the program to take effect.

 

12小时内时针分针重合几次?

1.试试一段小的python代码来理清思路

for hour in range(0, 11, 1):
       for minute in range(0, 59, 1):
              m_angle = minute * 360/60
              h_angle = hour * 360/12 + 360/12/60 * minute    # in this case, '/' is integer divider
              if m_angle == h_angle:  # integer approx. comparing
              print hour, round(30/5.5 * hour, 1) # 30hour + 0.5minute = 6minute, solve minute=30/5.5hour

2. 上述代码里算角度的除法实际上得到的是integer,因此if判断语句得到的(hour,miute)结果并不是真正重合的时间,只是过了这个时间后很快就有一次重合

3. 通过代码也理清了思路,实际上每小时都会有一次重合,至于是什么时间重合,实际上是解下面这个方程:

Continue reading 12小时内时针分针重合几次?

Speed Up Window Resizing Animation Speed in Mac OS X 10.10 El Capitan

OS X 10.10 Full screen resizing animation is annoying.

No way to turn the animation off, only to speed up.

In terminal:

defaults write -g NSWindowResizeTime -float 0.001

To turn off:

defaults delete -g NSWindowResizeTime

 

Extract Windows 10 beautiful spotlight (lock screen) wallpaper

  1. Enable ‘Show hidden files’
  2. Go to This PC > C: > Users > [Your User Name] > AppData > Local > Packages > Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy > LocalState > Assets
  3. Copy out all the files to a new Folder e.g. ‘Foo’
  4. Within foler ‘Foo’, enter into Windows Command line prompt (CMD), bulk rename all files with .jpg extension using this command:  >  ren * *.jpg
  5. View all the jpg files, select the one you want. Done.

OS X 10.10 Yosemite Transfer Old Apps Settings to New Hard drive

Copy files from old hard drive to new. If user name changed, need to change owner for old files.

1. Show hidden files in the Finder
In terminal:
defaults write com.apple.finder AppleShowAllFiles Yes
killall Finder

2. Message App:
1) Open Messages on both Macs and go Preferences > Accounts > iMessage > Sign Out
2) Copy these folders and override from old Mac to new Mac

~/Library/Messages
~/Library/Containers/com.apple.iChat

3) Restart new Mac
4) Open Messages and sign in to iMessages again

3. Dictionary App
~/Library/Dictionaries

4. Mail App
~/Library/Mail
~/Library/Containers/com.apple.mail
~/Library/Containers/com.apple.MailServiceAgent

HP Proliant G7 N54L Freenas 9.3 NAS Build Log

NAS Server build LOG ( It is still improving, many errors)

For my own reference

Start time: Jan 04, 2015

Project completion time: Jan 28, 2015

0.  Introduction

  • Planning:

Pure central storage server

  • Requirements:

Minimum Cost, Reliable Hardware, Data Redundancy, Fast & stable local file sharing, anywhere data accessing; the more storage space, the better.

1. Hardware selections:

1.1 Server:

  • Model: HP Proliant MicroServer G7 744900-001 4-HDD Bay
  • CPU: AMD Turion II Neo N54L CPU, 25W TDP

Similar performance CPU for comparsion -> (Intel Core i5 520M)

  • Build-in RAM: SKhynix 4GB, 1333MHz, PC3-10600E-9, DDR3, dual-rank x8, 1.50V, unbuffered with ECC dual in-line memory module (UDIMM)

Model: HMT351U7EFR8C-H9 T0 AF

Part Number: 500210-171

  • NIC: Broadcom NC107i Gbps
  • Reason: $199, HP Warranty, Hard drive bays, Sever grade hardware & design

Dual core CPU satisfies home NAS requirements

2.2Ghz is good enough for single thread CIFS share

Two slot ECC RAM, expandable to 16G, important for ZFS file system

Direct USB port on the motherboard, convenient for OS USB drive. Continue reading HP Proliant G7 N54L Freenas 9.3 NAS Build Log

Recover Acrobat XI favourite commands settings from offline Windows 8.1 Registry File on external HDD

I backup entire Windows 8.1 partition to an external hard drive and re-installed Windows.

I tried to recover my Acrobat XI common tool settings from backup instead of customizing them again.

Prepare:

I don’t know where Acrobat stores these settings. By google, in windows 8.1, Acrobat puts files in this location:

C:UsersUser_NameAppDataRoamingAdobeAcrobat11.0Preferences

However I didn’t find any useful files related with Common Tools settings. I guess that the settings are in Windows Registry.

Extract offline registry from my backup external hard drive

1. The Tool I am using: RegFileExport v1.06 

http://www.nirsoft.net/utils/registry_file_offline_export.html

2.Windows put registry file here since Vista:

Current User Settings:

1
Users%username%NTUSER.DAT

Computer Settings:

1
WindowsSystem32Config

3. Extract: In windows command line (cmd):

RegFileExport “J:UsersMyNameNTUSER.DAT” “E:OldReg.txt”

4.  Export my current Acrobat registry at “[HKEY_CURRENT_USERSoftwareAdobeAdobe Acrobat11.0” to temp.reg

5. Comparing content in OldReg.txt and temp.reg using Notepad++ and compare plugin, I found that Acrobat puts settings related to Common Tools at

“[HKEY_CURRENT_USERSoftwareAdobeAdobe Acrobat11.0AVGeneralcFavoritesCommandsDesktop]”

6.Extract these settings from my old registry and import in the current registry. Success!

7. Here is my example settings – AdobeCommon.reg

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USERSoftwareAdobeAdobe Acrobat11.0AVGeneralcFavoritesCommandsDesktop]
"a0"="Text"
"a1"="Highlight"
"a2"="RotatePages"
"a3"="TouchUpEditPDFTool"
"a4"="FreeTextTypewriter"
"a5"="Ink"
"a6"="EraseInk"