Uninstall OS X extensions, additional audio devices (drivers)

A lot of third-party audio/video app (Screen recording apps) will install the additional audio device in the system preference panel.

To list all third party kernel extensions in Mac OS X:

In terminal:

kextstat | grep -v com.apple

To uninstall the extension:

sudo kextunload -b NAME_OF_THE_EXTENSION
e.g. sudo kextunload -b com.globaldelight.driver.Boom2Device

Continue reading Uninstall OS X extensions, additional audio devices (drivers)

Youtube Live Streaming Mac screen & system audio with OBS

My Settings:

Environment:

2015 Macbook pro 13 with 2.7Ghz Intel Core i5 & 8Gb Ram

OS X El Capitan 10.11.6 + OBS 0.15.1 (Mac Version)

Internet: 100Mbps download; 7Mbps upload

First, schedule a Youtube Live Event:

Youtube-> Creator Studio-> Live Streaming -> Events -> New Live Event: Continue reading Youtube Live Streaming Mac screen & system audio with OBS

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小时内时针分针重合几次?

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"

Acer Aspire V5-473P-5602 风扇调速

换了个本儿,写一个Log:

Acer Aspire V5-473P-5602 i5-4200U,无独立显卡, 使用起来感觉风扇略吵. 找不到现成可用的风扇调速软件.

使用RWEverything (http://rweverything.com/) 读取系统Embedded Controller (EC)试图找到控制风扇方法.

473P拆机后发现,设计时的双风扇在此机器上只有一个(假如键盘向上,这个风扇在右边), 473PG独显版本才有两个风扇. 感觉这单个风扇不足安静的将CPU温度控制在合理范围.

使用上述软件读取EC Register后发现,貌似这台机器的设计不同于一般笔记本, 似乎没法直接控制风扇的转速,只能按照档位调节,貌似只有少数笔记本这么设计,比如Asus Zenbook和Thinkpad x些列12寸的个别机器.

EC Register 上, 目前研究下来,可能的分配是:

Hex地址: (对应值均为Hex)

55 -> 控制风扇档位 -> :  00 风扇关闭; 01-04 由低到高的4个风扇档位,05貌似这时候风扇速度已经最大了,虽然数字还可以调高,但是没啥变化了; 1F 这时候风扇是最大转速而且系统不会更具CPU温度自动降档位了. 在其他数值,系统会更具温度很快的降下档位

56-> CPU图形核心温度

58->CPU Package温度

5C->风扇转速 -> 目前发现数值大约是以下规律: 00 风扇关闭 09 最低转速 1B最高转速. 听风扇声音, 和实际转速的对应关系可能是 Decimal数值 x 100, 也是就900RPM 到 2700 RPM

5D->数值变化没规律,但是是紧接着5C,怀疑是未安装的那个风扇的转速读数 Continue reading Acer Aspire V5-473P-5602 风扇调速

Using Stanford Phoenix++ MapReduce to count the most frequent words in Wikipedia Database

Log of a quick and fun afternoon project.

1. Download Wikipedia English-language Database:

http://en.wikipedia.org/wiki/Wikipedia:Database_download

Download pages-articles.xml.bz2

Uncompress it ro pages-articles.xml (around 45GB)

2. Download Phoenix++:

http://mapreduce.stanford.edu/

http://mapreduce.stanford.edu/plus/phoenix++-1.0.tar.gz

make binary file and then find ‘word_count’ in ‘tests’ folder

3. copy wordcount and pages-articles.xml to the same folder

./word_count pages-articles.xml 1000 >wikiwords.txt

Using wordcount program to count top 1000 popular words from wiki database

4. Result: (Using 8 Xeon E5 server, 128 processing cores) Continue reading Using Stanford Phoenix++ MapReduce to count the most frequent words in Wikipedia Database

Install github atom text editor on Ubuntu 14.04 x64

Official guide:

https://github.com/atom/atom/blob/master/docs/build-instructions/linux.md

Quote here:

  git clone https://github.com/atom/atom
  cd atom
  script/build # Creates application at /tmp/atom-build/Atom
  sudo script/grunt install # Installs command to /usr/local/bin/atom
  script/grunt mkdeb # Generates a .deb package at /tmp/atom-build

My log (for future re-installation): current version 0.95-f86280a

#**********************
#go to http://nodejs.org/download/
#download node.js source code
cd ~/tmp/nodejs
wget  http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
tar xzvf node-v0.10.28.tar.gz
cd node-v0.10.28
./configure
./make test
#if failure occures at any stage, fix those. In my case, I failed at 'curl'.
sudo apt-get install curl
./make
sudo make install
#***********************
sudo apt-get install npm
sudo apt-get install libgnome-keyring-dev
sudo npm config set python /usr/bin/python2 -g
#*************************
cd ~/tmp/atom
git clone https://github.com/atom/atom
cd atom/script
sudo ./build
#err occurs at build: node-gyp, my solution:
sudo apt-get remove gyp
#This works
sudo ./build  #this will create app at /tmp/atom-build/Atom
#**************************
cd ~/atom/atom
sudo npm install -g grunt-cli
#don't know if above command is necessary or not
npm install
cd build
sudo grunt install #this will install atom to /usr/local/bin/atom
sudo grunt mkdeb #this will make .deb package at /tmp/atom-build
#****************************
#Finished!
#To run
sudo atom
#package management
apm

 

Windows 8.1 Event 10016 Fix: The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID {D63B10C5-BB46-4990-A94F-E40B9D520160}

A year ago, I had such error message in the event viewer on the first day of fresh installation of Windows 8. I believed it was also the reason that I had a blue screen: MEMORY_MANAGEMENT error. It was caused by ntoskrnl.exe upon inspecting Windows Mini Dump, by a tool named BlueScreenView.  Now a year later, after I recently updated to Windows 8.1 Update 1, the problem came back again. I decide to log it here.

After inspecting Windows Event Viewer, the error is the same as before, which is:

Event 10016, DistributedCOM

The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{D63B10C5-BB46-4990-A94F-E40B9D520160}
and APPID
{9CA88EE3-ACB7-47C8-AFC4-AB702511C276}
to the user NT AUTHORITYSYSTEM SID (S-1-5-18) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.

Here is a way I found to fix it:

1.Go to Component Service: dcomcnfg  (in Windows 8.1, you may hit ‘Win’ + Q and enter dcomcnfg, and launch it by Admin)

At the left panel, go to ‘Component Service->Computers->My Computer->DCOM Config’, then at the right panel, find by name: ‘RunTimeBroker’ (This is {D63B10C5-BB46-4990-A94F-E40B9D520160})

Right click it, choose ‘Property’ -> ‘Security’.   Then I found everything was grey and unable to edit.

2. To enable editing ‘Security’, launch regedit (‘Win’ + Q and enter regedit, open the application by Admin)

Browse to Hkey_classes_rootAppID{9CA88EE3-ACB7-47C8-AFC4-AB702511C276}, Right click it

Choose ‘Permissions’, -> Choose ‘Advanced‘ -> Change Owner to ‘Administrators’ of your PC -> Apply the change

Then change ‘SYSTEM’ and ‘Administrators’ ‘s permission to ‘Full Control’ under ‘Permission’ -> Apply the change

3. Go back to Component Service dcomcnfg

Now the Security section is able to edit.

In ‘Launch and Activation Permissions’, Add ‘SYSTEM’ and give it permission ‘Full Control’

4. DONE!

Continue reading Windows 8.1 Event 10016 Fix: The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID {D63B10C5-BB46-4990-A94F-E40B9D520160}