12/13/2012

AR8161 on-board lan to work (ASUS P8H77-V board)


sudo apt-get install linux-headers-generic build-essential
wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.5/compat-wireless-3.5.1-1-snpc.tar.bz2
tar -xf compat-wireless-3.5.1-1-snpc.tar.bz2
cd compat-wireless-3.5.1-1-snpc
./scripts/driver-select alx
make
sudo make install
sudo modprobe alx


http://ubuntuforums.org/showthread.php?t=2050126&highlight=p8h77-v

10/08/2012

Edit mime type

Install file type editor ( command name : assogiate )

(some file types are unable to edit.)

or

cd [path]
 where, path = /usr/local/share/mime  or ~/.local/share/mime or /usr/share/mime
cd packages
gedit [file_type_you_want]

sudo update-mime-database [path]

** Don't forget BACKUP !


5/11/2012

Increasing the sheet name tab size for libreoffice calc in ubuntu 12.04


In libreoffice calc, the font size (or horizontal height) for the sheet name tab is related to the scrollbar slider width.

Open "/usr/share/thmemes/[a theme used, e.g. Ambiance]/gtk-2.0/gtkrc"

find "GtkScrollbar::slider-width = xx", where xx is a number.

then, change the number xx to a larger value.

Logout and login, or, (this is better) change theme to other one and then return to current theme using ubuntu tweak.


5/10/2012

geany python comment color

$ cd ~/.config/geany/filedefs

$ cat filetypes.python

# For complete documentation of this file, please see Geany's main documentation
[styling]
# foreground;background;bold;italic
default=default
commentline=commentdoc
number=number
string=string
character=string
word=keyword
triple=string
tripledouble=commentdoc
classname=type,bold
defname=function
operator=operator
identifier=default
commentblock=comment
stringeol=stringeol
# flip bold for identifiers
word2=keyword2,bold
decorator=preprocessor


[keywords]
# all items must be in one line
primary=and as assert break class continue def del elif else except exec finally for from global if import in is lambda not or pass print raise return try while with yield False None True
# additional keywords, will be highlighted with style "word2"
# these are the builtins for Python 2.5 created with ' '.join(dir(__builtins__))
identifiers=ArithmeticError AssertionError AttributeError BaseException BufferError BytesWarning DeprecationWarning EOFError Ellipsis EnvironmentError Exception False FloatingPointError FutureWarning GeneratorExit IOError ImportError ImportWarning IndentationError IndexError KeyError KeyboardInterrupt LookupError MemoryError NameError None NotImplemented NotImplementedError OSError OverflowError PendingDeprecationWarning ReferenceError RuntimeError RuntimeWarning StandardError StopIteration SyntaxError SyntaxWarning SystemError SystemExit TabError True TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError Warning ZeroDivisionError __debug__ __doc__ __import__ __name__ __package__ abs all any apply basestring bin bool buffer bytearray bytes callable chr classmethod cmp coerce compile complex copyright credits delattr dict dir divmod enumerate eval execfile exit file filter float format frozenset getattr globals hasattr hash help hex id input int intern isinstance issubclass iter len license list locals long map max min next object oct open ord pow print property quit range raw_input reduce reload repr reversed round set setattr slice sorted staticmethod str sum super tuple type unichr unicode vars xrange zip


[lexer_properties]
fold.comment.python=1
fold.quotes.python=1


[settings]
# default extension used when saving files
extension=py


# the following characters are these which a "word" can contains, see documentation
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789


# if only single comment char is supported like # in this file, leave comment_close blank
comment_open=#
comment_close=


# set to false if a comment character/string should start at column 0 of a line, true uses any
# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
#command_example();
# setting to false would generate this
# command_example();
# This setting works only for single line comments
comment_use_indent=true


# context action command (please see Geany's main documentation for details)
context_action_cmd=


[build_settings]
# %f will be replaced by the complete filename
# %e will be replaced by the filename without extension
# (use only one of it at one time)
compiler=python -m py_compile "%f"
run_cmd=python "%f"

$ cat filetypes.common

# For complete documentation of this file, please see Geany's main documentation
[styling]
# use foreground;background;bold;italic or named_style,bold,italic


# used for filetype All/None
default=default


# 3rd selection argument is true to override default foreground
# 4th selection argument is true to override default background
selection=0x000000;0xc0c0c0;false;false


# style for a matching brace
brace_good=0x0000ff;0xFFFFFF;true;false
# style for a non-matching brace (a brace without a counterpart)
brace_bad=0xff0000;0xFFFFFF;true;false


# the following settings define the colours of the margins on the left side
margin_linenumber=0x000000;0xd0d0d0;
margin_folding=0x000000;0xdfdfdf;
fold_symbol_highlight=0xffffff


# background colour of the current line, only the second and third argument is interpreted
# use the third argument to enable or disable the highlighting of the current line (has to be true/false)
current_line=0x000000;0xf0f0f0;true;


# translucency for the current line(first argument) and the selection (second argument)
# values between 0 and 256 are accepted. Note for Windows 95, 98 and ME users:
# keep this value at 256 to disable translucency otherwise Geany might crash
translucency=256;256


# style for a highlighted line (e.g when using Goto line or goto tag)
marker_line=0x000000;0xffff00;


# style for a marked search results (when using "Mark" in Search dialogs)
# the second argument sets the background colour for the drawn rectangle
# only the second argument is interpreted
marker_search=0x000000;0x0000f0;


# style for a marked line (e.g when using the "Toggle Marker" keybinding (Ctrl-M))
marker_mark=0x000000;0xb8f4b8;


# translucency for the line marker(first argument) and the search marker (second argument)
marker_translucency=256;256


# colour of the caret(the blinking cursor), only first and third argument is interpreted
# set the third argument to true to change the caret into a block caret
caret=0x000000;0x000000;false;


# width of the caret(the blinking cursor)
# width in pixels, use 0 to make it invisible, maximum width is 3
caret_width=1


# set foreground and background colour of indentation guides
indent_guide=0xc0c0c0;;


# third argument: if true, use this foreground color. If false, use the default value defined by the filetypes.
# fourth argument: if true, use this background color. If false, use the default value defined by the filetypes.
white_space=0xc0c0c0;0xffffff;true;false


# style of folding icons, valid values are:
# first argument:  1 for boxes, 2 for circles, 3 for arrows, 4 for +/-
# second argument: 1 for straight lines, 2 for curved lines or 0 for none
folding_style=1;1;


# should an horizontal line be drawn at the line where text is folded
# 0 to disable
# 1 to draw the line above folded text
# 2 to draw the line below folded text
folding_horiz_line=2


# first argument: drawing of visual flags to indicate a line is wrapped. This is a bitmask of the
# values: 0 - No visual flags, 1 - Visual flag at end of subline of a wrapped line, 2 - Visual flag
# at begin of subline of a wrapped line, Subline is indented by at least 1 to make room for the flag.
# second argument: whether the visual flags to indicate a line is wrapped are drawn near the border
# or near the text. This is a bitmask of the values: 0 - Visual flags drawn near border,
# 1 - Visual flag at end of subline drawn near text, 2 - Visual flag at begin of subline drawn near text
line_wrap_visuals=1;0;


# first argument: sets the size of indentation of sublines for wrapped lines in terms of
# the width of a space, only used when the second argument is 0
# second argument: wrapped sublines can be indented to the position of their first subline or
# one more indent level, possible values:
# 0 - Wrapped sublines aligned to left of window plus amount set by the first argument
# 1 - Wrapped sublines are aligned to first subline indent (use the same indentation)
# 2 - Wrapped sublines are aligned to first subline indent plus one more level of indentation
line_wrap_indent=0;1;


# first argument: amount of space to be drawn above the line's baseline
# second argument: amount of space to be drawn below the line's baseline
line_height=0;0;


# 3rd argument is true to override default foreground of calltips
# 4th argument is true to override default background of calltips
calltips=0xc0c0c0;0xffffff;false;false


[settings]
# which characters should be skipped when moving (or included when deleting) to word boundaries
# should always include space and tab (\s\t)
whitespace_chars=\s\t!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~


[named_styles]
# style names to use in filetypes.* [styling] sections
# use foreground;background;bold;italic
# normally background should be left blank to use the "default" style


default=0x000000;0xffffff;false;false
comment=0xd00000
#commentdoc=0x3f5fbf
commentdoc=0x9f9f9f
number=0x007f00
# keyword
keyword=0x00007f;;true;false
# usually type keywords and library type names
keyword2=0x991111;;true;false
string=0xff901e
preprocessor=0x007f7f
operator=0x301010
# unterminated string
stringeol=0x000000;0xe0c0e0;false;false
# user type names
type=0x0000d0;;true;false
# user function names
function=0x000080
extra=0x404080

$





ubuntu 12.04 chrome smooth gesture

http://ubuntuforums.org/showthread.php?t=1964168


5/09/2012

ubuntu ssh server setting


* ssh 서버 설치 및 설정


http://wiki.kldp.org/wiki.php/DocbookSgml/SSH-KLDP


1. 설치


    $ sudo apt-get install ssh


2. 포트 변경


    $ sudo vim /etc/ssh/sshd_config


    # port 22 에서 '#' 를 제거하고 원하는 포트로 변경


    IF >>  X-window 사용하고 싶을 경우, 
        
        /etc/ssh/ssh_config
        위의 파일의 다음내용을 변경한다
       
        # ForwardX11 no -> ForwardX11 yes 로 설정변경)


3. 데몬 재시작


    $ sudo /etc/init.d/ssh restart


4. 서버 작동 확인


    $ netstat -ntl




ref: http://towanouta.tistory.com/71

5/06/2012

ubuntu 11.10 add my program to "open with other program" menu

$ cat ~/.local/share/applications/myProgram.desktop

[Desktop Entry]
Name=whatever
GenericName=whatever
Comment="whatever comment"
Exec=exeFilePath %f
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/x-mimeType;
Icon=icon-name


4/12/2012

pylab - adjust the graph region, make x-axis ticks formatted

1. adjusting the margin of graph region

pylab.gcf().subplots_adjust(bottom=0.2)


2. x-axis ticks formatting
(ref: http://stackoverflow.com/questions/3677368/matplotlib-format-axis-offset-values-to-whole-numbers-or-specific-number )

from matplotlib.ticker import ScalarFormatter, FormatStrFormatter


# Plot the data...
fig = plt.figure()
ax = fig.add_subplot(111)

# Force the y-axis ticks to use 1e-9 as a base exponent
ax.yaxis.set_major_formatter(FixedOrderFormatter(-9))

# Make the x-axis ticks formatted to 0 decimal places
ax.xaxis.set_major_formatter(FormatStrFormatter('%0.0f'))

4/05/2012

30대 40대 10년 동안 해야 할 7가지



★ 30대 10년 동안 해야 할 7가지 ★




1. 철학사를 뒤적여 가장 매력적인 철학자 한 ‘분’을 골라라.

그 ‘분’에 관한 책 두 권을 정독하여 그 ‘놈’으로 만들어라.

철학은 땅으로 내려와야 하고, 좋은 스승은 반드시 좋은 친구가 될 수 있어야 함께 할 수 있다. (철학과 윤리)




2. 회사 명함 말고, 3년 뒤의 개인 명함을 만들어라.

우리는 이것을 꿈의 명함이라 부른다.

서른이 끝나기 전에 이 꿈을 성취하라. (꿈과 비전)







3. 일주일에 두 번은 4시간만 자라.

그리하여 그대의 ‘뼈가 아직 부러지지 않았다’는 것을 증명하라.(시간)




4. 차 하나를 사서 적어도 5년 전에는 바꾸지 마라.

10년을 쓸 수 있다면 더 좋다. 똥차가 바로 지금의 당신이다.

투자란 시간이 갈수록 가치가 늘어나는 것에 돈을 쓰는 것이다. ( 투자 )




5. 주식 3종목을 골라 계속 관심을 가지고 분석하고 예측해 보라.

돈을 걸든 걸지 않든 상관없다.

중요한 것은 당신의 예측에 대한 신뢰도를 높히기 위한 연습이라는 점이다. (자신에 대한 신뢰)










6. 10년 뒤에 살 집을 모색해 두어라.

실제로 돌아다니며 적어도 50군데의 동네와 200개의 집을 가보고 두 세 군데를 찍어 두라.

바라는 것을 얻는 것은 적극적인 기다림이다. (구체적인 장기 목표)




7. 취미 하나를 가져라.

유행과 관계없이 가장 자기다운 취미 하나를 골라 일주일에 두 번은 즐기도록 하라.

(활력을 얻는 소스)







♬ 40대에 해야 할 7가지 ♪




1. 자신의 철학을 가다듬어라.

차용한 철학으로는 낭떠러지를 뛰어내려 자신의 길을 갈 수 없다.




2. 사표를 써라.

직장에서 중역이 되든 나와서 창업을 하든 일단 사표는 써야한다. 떠남이 목표일 때가 있다.

이 때가 그 때다. 떠나지 못하면 모욕을 당할 것이다.

조직의 안에 있든 밖에 있든 자신만의 비즈니스를 시작하라.




3. 하루의 시간을 완전히 개편하라.

새벽에 일어나고 일찍 자라.

일주일이면 새벽에 일어나도록 바이오 클록을 바꿀 수 있다. 그러나 습관이 되려면 반드시 일찍 자야한다. .




4. 하루에 두 시간은 자신의 전문성을 위해 투자하라.

R & D 없이 어제보다 나아질 것이라고 생각하면 그건 이상한 논리다.




5. 가장 아름다운 가정 하나를 만들어라.

아이들이 가장 좋아하고 존경하는 사람이 되라. 아내와 남편에게 가장 매력적인 애인이 되라.

밖에서 성공하고 안에서 실패한 사람들을 너무 많이 보았다.

가정을 얻는 것 보다 좋은 투자는 없다.




6. 오래 동안 마음에 그리던 집을 사라.

거기서 깨어나고 생각하고 즐기고 잠드는 아름다운 공간을 가족에게 선물하라.




7. 취미 속에서 평생 직업의 힌트와 싹을 키워라.

하고 싶은 일과 잘 할 수 있는 일만이 ‘good to great"로의 전환을 가능하게 한다.

끊임없는 실험과 학습이 이 시기의 키워드다.

4/02/2012

scipy 0.7 to 0.9 arpack interface change

http://docs.scipy.org/doc/scipy-0.9.0/reference/release.0.9.0.html?highlight=arpack#arpack-interface-changes


Other changes

ARPACK interface changes

The interface to the ARPACK eigenvalue routines in scipy.sparse.linalg was changed for more robustness.
The eigenvalue and SVD routines now raise ArpackNoConvergence if the eigenvalue iteration fails to converge. If partially converged results are desired, they can be accessed as follows:
import numpy as np
from scipy.sparse.linalg import eigs, ArpackNoConvergence

m = np.random.randn(30, 30)
try:
    w, v = eigs(m, 6)
except ArpackNoConvergence, err:
    partially_converged_w = err.eigenvalues
    partially_converged_v = err.eigenvectors
Several bugs were also fixed.
The routines were moreover renamed as follows:
  • eigen –> eigs
  • eigen_symmetric –> eigsh
  • svd –> svds

1/20/2012

terminal timer command

$ sleep 60; gmessage -bg RED -geometry 800x600 -center "Time is up." & echo "Time is up." | festival --tts

sleep 60 -> 60sec waiting.
gmessage -> display messagebox
echo "something" | festival --tts  -> Text to speech

1/19/2012

Enabling systray in Ubuntu 11.10 Unity

1.


$ gsettings get com.canonical.Unity.Panel systray-whitelist


['JavaEmbeddedFrame', 'Wine', 'scp-dbus-service', 'Update-notifier']


$ gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Wine', 'scp-dbus-service', 'Update-notifier', 'DaumCloud']"


-> then re-login


2.


install dconf-tools


$ dconf-editor
-> desktop > unity > panel > enable the notification area


dconf-editor


1/17/2012

Ubuntu 11.10 unity sucks!



This unity interface is ... sucks !

Flexibility has gone... customizing become more difficult....

Linux mint or debian.. I'm considering..