2013年8月26日 星期一

【限時免費】立即裝Mailbox 可獲Dropbox 1GB免費空間

Dropbox 又推出新的免費空間活動,只要iOS [iOS6.0以上限定]用戶安裝新的軟體"mailbox"就可以獲得

額外免費的1GB空間.如果還沒安裝dropbox的人,可以透過下列的連結去安裝dropbox

http://db.tt/u4rQph2 

NewImage

2013年8月23日 星期五

PARL法則

Problem:抱持的問題

Action:採取的行動

Rsult:行動的結果

Learning:從中的學習

2013年8月22日 星期四

zmodem download/upload files

#!apt-get install lrzsz

linux 手動對時

#!ntpdate -u time.stdtime.gov.tw

[ubuntu] 使用apt-get 遇到錯誤 "E: Unable to correct problems, you have held broken packages."

今天使用apt-get install puppet,結果遇到了錯誤訊息 "E: Unable to correct problems, you have held broken packages."

本來以為是package dependence的關係,後來才發現我真的想太多了,只要簡單的下一個clean即可

#!sudo apt-get clean | sudo apt-get update
 

[Ubuntu] apt-get 的source.list中有關main, restricted等的差別

在使用ubunut 更新或安裝檔案時,常看到後面會寫 main , restricted, universe等等,但一直不知道他的差別,一直到今天才在wiki中看到ubunut 的說明我才知道,原來是有關軟體授權的差異
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted
 自由軟體非自由軟體
官方支援MainRestricted
非官方支援UniverseMultiverse

2013年8月20日 星期二

[SSH] Permission denied (password)

今天透過puppet自動安裝server後,發現[SSH] Permission denied (password),但不確定如何處理,只好開啟sshd debug model

處理方式如下

1)stop ssh 

#!/usr/sbin/sshd stop
#!/usr/sbin/sshd -d  (debug model)

2)debug log

  /var/log/auth.log

Management thinking[管理思維] vs entrepreneurship thinking[創業思維]

管理思維:先有目標,在靠能力去達成

NewImage

創業思維:先有能力,在去思考下一步做什麼

 

NewImage

2013年8月19日 星期一

優秀的領導人

轉至:能力雜誌

 

1.適當的肯定員工

2.支持員工而不是取而代之

3.在制定決策時詢問員工的意見

4.聆聽員工說想說的話

5.花時間解釋作出決定的原因

6留意與維護員工的自尊

 

@領導三和弦

聆聽->定調->行動

領導者的定義

Peter F.Drucker:

-有效的領導者不一定要很聰明,而是要言行一致

-領導者唯一的定義就是:一個有追隨者的人

Joseph Boyett:

-成為真正的領導者之前不可或缺的一項經驗就是失敗

Warren Bennis

-經理人會把事情做對,而領導人則是做對的事情

 

Lee Iacocca:

你可以做兩個人的工作,但你沒辦法成為兩個人

2013年8月14日 星期三

如何透過iTune刪除手機上面的共享文件

剛剛透過iTuen上傳更新地圖檔案到導航王,後來發現格式錯誤,想把檔案刪除,確不知道該怎麼刪除,後來找了一下,才發現原來真的是自己想太多了,其實只要選取檔案後,直接按delete即可,實在是簡單到讓人哭笑不得

NewImage

apt priority 使用與說明

   Pin-Priority表示:
# * 1001及以上:可降级优先级。
# Pin-Priority处于该范围的软件包允许降级操作。
# * 100到1000:标准优先级。
# 不允许降级。几个key Pin-Priority的值:
# * 990:由`--target-release'或apt-get(8)`-t'选项设置的优先级。
# * 500:所有默认软件包文件的优先级。
# * 100:当前安装软件包文件的优先级。
# * 0到99:非自动优先级。(仅用于软件包没有安装或没有别的可用版本时。)
# * 小于0:决不选择该版本。
#-----------------------------
# 例如我要保持puppet 的3.02版本 只需加上:
# Package: puppet
# Pin: version 3.02*
# wildcard * 指锁定以3.02開頭的所有版本
# Priority(优先级)是可选项 默认 989
# <0 此软件永不会被安装
# 0~100 软件不被安装,不是有效的版本
# >100 此软件会被安装 即 如果有更新版本,软件会被升级
# 100~1000 软件不会被降级安装,例如:我安装的puppet 3.02 , 锁定puppet 0.58 ,优先级为999
# 那么3.02就不会被安装 ,如果要降级安装 则优先级许大于 1000,
例如系統已經自己安裝或升級到3.23,遇到這個repo server則會自動降級到3.02

2013年8月8日 星期四

[Ubunut] How to change keyboard layout

#!dpkg-reconfigure keyboard-configuration
 
#!dpkg-reconfigure console-setup.

王宗立 梁凱恩

看似兩個沒關係的人,卻原來也是有關係,對於王宗立,我沒印象,只是剛好看到今天的新聞,寫說他是台灣辣妹直銷詐騙的始祖,然後他最近轉換到科技業,又騙了好幾億,在百度百科,上面些他是一個亞洲成功學教父,至於梁凱恩則原至於去年在一個偶然的下午看到他投資的電影,下一個成功的奇蹟,寫的很聳動,但對於這個人我完全沒聽過,所以有稍微搜潯一下,知道他是從事直銷業,由於我對於直銷業一直沒太好的印象,所以就沒繼續關注,但今天不小心看到下列文章,才發現原來兩個人都是有關係的,原來梁凱恩曾經任職的公司,宣稱幫企業營業額衝到幾十億的公司,就是王宗立的詐騙公司,只能說人生啊,新聞阿! 真的看看就好了

連結:http://blog.udn.com/tuankochin/1064139

2013年8月6日 星期二

致孟楠(中國好聲音第二季第四期)

其實這篇是看到同事寫的部落格而產生的回應,一個有實力的女唱作者,也曾經寫出成功的歌曲,卻來到一個更大的舞台想要尋夢,不禁讓我想到

1)人才是需要舞台的,一個人曾經做過成功的產品,也有很好的實力,卻偏偏時運不振

2)人才是需要伯樂的,從四位講師中,阿妹沒有回頭,就看得出,因為不是創作者,所以他不知道演唱者的厲害之處,或者說也可以說他只專注在演唱者的歌唱實力,所以對於演唱者的創作實力沒注意到

2013年8月1日 星期四

Troubleshooting steps on puppet certificate

Check that both the puppetmaster and the client machine can resolve the FQDN of the puppetmaster. For this to work, you need to add the puppetmaster IP to your /etc/hosts in both machines, then check it using:

$ ping puppetmaster or $ getent hosts puppetmaster

Check that you can reach the puppetmaster from the client machine

$ telnet puppetmaster 8140

If you get connection refused by the server, check that the port is opened in the puppetmaster

# iptables -L -n -v

Or add a rule to allow incoming traffic to that port (this is dependent on how is iptables already configured)

# iptables -A INPUT -p tcp --dport 8140 -m state --state NEW -j ACCEPT

And run from the client

# puppet agent --test --waitforcert 5

Afterwards, from the puppetmaster

# puppet cert list

will show you the cert ready to be sign, you can check it belongs to the client machine comparing the fingerprint. Sign it:

# puppet cert sign $client

Puppetmaster will compile a catalog for the client and you can follow how it is applied in the client console.

To regenerate the certificates on the puppetmaster, stop the ppuppetmaster and

# find $(puppet master --configprint ssldir) -name "$(puppet master --configprint certname).pem" -delete

When you start the puppetmaster again, it will regenerate the certificate for you.

On the client side, it is enough to remove the conttents of the ssldir, usually /var/lib/puppet/ssl, but check as above, the next time you invoke

# puppet agent --test --waitforcert 5

it will be recreated.

Eventually, check the CN of the certificate of the puppetmaster with

# puppet cert list --all

and match any of the names/ALT names to the entry in your /etc/hosts.

WYSIWYG==> What You See Is What You Get 所見即所得

How to troubleshoot kernel panic in Mac Paralles

Reference :  http://kb.parallels.com/en/10007

 

問題的描述:

今天在嘗試使用puppetlab 提共的vm到parallels使用時,遇到的kernel panic問題,但卻不知道該如何下手,後來就從paralles上面的論壇找到有關kernal panic的debug 方法,然後再從有問題的debug log中找到原來是找不到lvm 的virtual group,然後繼續找就看到原來他是開機的時候嘗試找尋ide硬碟,但轉換後他卻直接使用scsi,所以造成找不到硬碟,才會顯示kernal panic

 

重點:

1.安裝虛擬的serial port,並把開機資料導出文字檔案中

2.修改開機指令,讓開機資料導出到虛擬的serial port中

NewImage

NewImage

 

Debug.txt

…serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16450 00:0b: ttyS0 at I/O 0x3f8 (irq = 4) is a 16450 brd: module loaded Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx ICH2: IDE controller at PCI slot 0000:00:1f.1 ICH2: chipset revision 5 ICH2: not 100% native mode: will probe irqs later ide0: BM-DMA at 0xe200-0xe207, BIOS settings: hda:DMA, hdb:DMA ide1: BM-DMA at 0xe208-0xe20f, BIOS settings: hdc:DMA, hdd:DMA Probing IDE interface ide0... hda: Virtual DVD-ROM [0], ATAPI CD/DVD-ROM drive ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 Probing IDE interface ide1... Probing IDE interface ide1... ide-floppy driver 0.99.newide

--------

Activating logical volumes Volume group "vg00" not found Trying to resume from /dev/vg00/swapvol Unable to access resume device (/dev/vg00/swapvol) Creating root device. Mounting root filesystem. mount: could not find filesystem '/dev/root' Setting up other filesystems. Setting up new root fs setuproot: moving /dev failed: No such file or directory no fstab.sys, mounting internal defaults setuproot: error mounting /proc: No such file or directory setuproot: error mounting /sys: No such file or directory Switching to new root and running init. unmounting old /dev unmounting old /proc unmounting old /sys switchroot: mount failed: No such file or directory Kernel panic - not syncing: Attempted to kill init!

How to let your raspberry pi simulate iOS airplay

First off, we need to install a few things before we can get Shairport. Type this into the console:

sudo apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl

Let this process run for a little while. When it's complete, we need to install an update so Shairport will work with iOS 6 (you can skip this step if you're not on or plan to upgrade iOS 6):

git clone https://github.com/njh/perl-net-sdp.git perl-net-sdp
cd perl-net-sdp
perl Build.PL
sudo ./Build
sudo ./Build test
sudo ./Build install
cd ..

Once the iOS 6 module is installed (give it a little while), it's finally time to get Shairport installed. from your home directory type:

git clone https://github.com/hendrikw82/shairport.git
cd shairport
make

Now, let's run Shairport:

./shairport.pl -a AirPi

This command starts Shairport with your Raspberry Pi named "AirPi" (you can change it to whatever you want). Grab your iOS device, pick the music app of your choice, and tap the AirPlay button. You should see "AirPi" listed as an output device. Tap that, and the music should start streaming out of your USB sound card within a couple seconds.

But we're not done yet. Shairport doesn't automatically load when you start your Raspberry Pi, and since we want to make our AirPlay device work without any peripherals we need to do one more step. From your home directory, type:

cd shairport
make install
cp shairport.init.sample /etc/init.d/shairport
cd /etc/init.d
chmod a+x shairport
update-rc.d shairport defaults

Finally, we need to add Shairport as a launch item. Type:

sudo nano shairport

This loads up Shairport file we need to edit. Look through the file for the "DAEMON_ARGS" line, and change it so it looks like this:

DAEMON_ARGS="-w $PIDFILE -a AirPi"

[Mac] How to install pycurl on mac 10.8.4

今天想要透过easy_install 直接安裝pycurl,卻一直遇到問題
/opt/local/include/curl/curlrules.h:143:6: error: '__curl_rule_01__' declared as an array with a negative size
[CurlchkszEQ(long, CURL_SIZEOF_LONG)];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/curl/curlrules.h:132:27: note: expanded from macro 'CurlchkszEQ'
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
^~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/curl/curlrules.h:153:6: error: '__curl_rule_02__' declared as an array with a negative size
[CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/curl/curlrules.h:132:27: note: expanded from macro 'CurlchkszEQ'
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
 
 
後來上google搜尋,建議直接加上環境變數archflags -arch x86_64即可
sudo env ARCHFLAGS="-arch x86_64" easy_install setuptools pycurl==7.19.0

如何下載Facebook 相簿跟影片

影片:透過chrome plug-in : Video Downloader for Facebook<sup>TM</sup> 相簿: 透過chrome plug-in : Tampermonkey 搭配script : Facebo...