- install
sudo apt-get install mysql-server
> mysql account password ---> root:MY_PASS_IS
edit /etc/mysql/my.cnf file
bind-address = 192.168.0.5
bind-address = 127.0.0.1 --> only local access
s ls -al /etc/mysql/my.cnf
> 우분투에서는 alternatives 로 my.cnf 를 관리한다.
: lrwxrwxrwx 1 root root 24 12월 24 23:07 /etc/mysql/my.cnf -> /etc/alternatives/my.cnf
--> alternatives 가 사용됨
USER_ME@gig:/etc/mysql/mysql.conf.d$ sudo update-alternatives --config my.cnf
: 대체 항목 my.cnf에 대해 (/etc/mysql/my.cnf 제공) 2개 선택이 있습니다.
: 선택 경로 우선순� 상태
: ------------------------------------------------------------
: * 0 /etc/mysql/mysql.cnf 200 자동 모드
: 1 /etc/mysql/my.cnf.fallback 100 수동 모드
: 2 /etc/mysql/mysql.cnf 200 수동 모드
:
: Press <enter> to keep the current choice[*], or type selection number:
--> my.cnf ==> refer to /etc/mysql/mysql.cnf
--
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
sudo vi /etc/mysql/conf.d/mysql.cnf
[mysql]
[client]
default-character-set=utf8 # <-- add this line
--
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
....
# localhost which is more compatible and is not less secure.
# bind-address = 127.0.0.1 <-- comment
bind-address = 0.0.0.0 <-- change
[mysqld] <---- 이 섹션에 아래 5개 라인 추가
...
init_connect=SET collation=utf8_general_ci
init_connect=SET NAMES utf8
# default-character-set=utf8 # error
character-set-server=utf8 # new DB create with option character-set
collation-server=utf8_general_ci
- restart service
tail -f /var/log/mysql/error.log
sudo service mysql restart
or
sudo /etc/init.d/mysql restart
then check
sudo netstat -tap | grep mysql
: - mysql-client
: sudo apt-get install mysql-client
- connect
mysql -u root -p
or
mysql -h server_ip -P 3306 -u root -p
- create database
create database journaldev;
use journaldev;
create table person (
id int unsigned auto_increment,
name varchar(30),
age int,
gender char(3),
grade int,
primary key(idx)
) Engine='InnoDB' default charset='utf8';
- user add
> 로컬에서 접속 모두 허가
GRANT ALL PRIVILEGES ON journaldev.* TO USER_ME@localhost IDENTIFIED BY 'MY_PASS_IS';
> 외부에서 접속 모두 허가
GRANT ALL PRIVILEGES ON journaldev.* TO USER_ME@'%' IDENTIFIED BY 'MY_PASS_IS';
> 특정 권한만 지정
GRANT INSERT,UPDATE,SELECT ON journaldev.* TO USER_ME@'localhost' IDENTIFIED BY 'MY_PASS_IS';
> commit;
flush privileges;
status;
> if super priviledge need - with grant option
#+begin_src
GRANT ALL PRIVILEGES ON journaldev.* TO 'USER_ME'@'%' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON journaldev.* TO 'USER_ME'@localhost WITH GRANT OPTION;
#+end_src
ex.1
#+begin_src
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP,
INDEX, ALTER, CREATE TEMPORARY TABLES
ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';
#+end_src
ex. 2
#+begin_src
GRANT EXECUTE, PROCESS, SELECT, SHOW DATABASES, SHOW VIEW, ALTER, ALTER ROUTINE,
CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP,
EVENT, INDEX, INSERT, REFERENCES, TRIGGER, UPDATE, CREATE USER, FILE,
LOCK TABLES, RELOAD, REPLICATION CLIENT, REPLICATION SLAVE, SHUTDOWN,
SUPER
ON *.* TO mysql@'%'
WITH GRANT OPTION;
#+end_src
- mysql-workbench
: USER_ME@gig:~$ sudo apt-get install mysql-workbench
then run
$ mysql-workbench
Saturday, January 16, 2016
apache-maven
> download: http://maven.apache.org/download.cgi#
> extract to /data/develop/apache-maven-3.3.9/
export M2_HOME=/data/develop/apache-maven-3.3.9
$PATH ...
then check
kys@gig:/data/develop$ echo $M2_HOME
>>> /data/develop/apache-maven-3.3.9
# Maven Env. variable
vi /etc/profile
#+TITLE: /etc/profile
#+begin_src
export JAVA_HOME=/usr/local/java
export CLASSPATH=.:$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export M2_HOME=/usr/local/maven
PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
#+end_src
source /etc/profile
> check maven version
mvn -version
- path
# java, apache-tomcat, maven
#+TITLE: ~/.bashrc
#+begin_src
..
export JAVA_HOME=/usr/lib/java/jdk1.8.0_65
export TMP_CLASSPATH=$CLASSPATH
export CLASSPATH=.:$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export CLASSPATH=$TMP_CLASSPATH:$CLASSPATH
export CATALINA_HOME=/data/develop/apache-tomcat-8.0.30
export M2_HOME=/data/develop/apache-maven-3.3.9
PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin:$CATALINA_HOME/bin
#+end_src
$ source ~/.bashrc
- apache-maven setting
> backup
cp /data/develop/apache-maven-3.3.9/conf/settings.xml /data/develop/apache-maven-3.3.9/conf/settings.xml-dist
modify settings.xml <--- (this for both global and local)
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- modified -->
<localRepository>/data/develop/dot.m2/repository</localRepository>
..
kys@gig:/data/Project_Pool/check$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T01:41:47+09:00)
Maven home: /data/develop/apache-maven-3.3.9
Java version: 1.8.0_65, vendor: Oracle Corporation
Java home: /usr/lib/java/jdk1.8.0_65/jre
Default locale: ko_KR, platform encoding: UTF-8
OS name: "linux", version: "4.2.0-16-generic", arch: "amd64", family: "unix"
kys@gig:/data/Project_Pool/check$
- OK. fix repoisitory
$ cd ~/.m2
$ ln -s /data/develop/dot.m2/repository repository
> extract to /data/develop/apache-maven-3.3.9/
export M2_HOME=/data/develop/apache-maven-3.3.9
$PATH ...
then check
kys@gig:/data/develop$ echo $M2_HOME
>>> /data/develop/apache-maven-3.3.9
# Maven Env. variable
vi /etc/profile
#+TITLE: /etc/profile
#+begin_src
export JAVA_HOME=/usr/local/java
export CLASSPATH=.:$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export M2_HOME=/usr/local/maven
PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
#+end_src
source /etc/profile
> check maven version
mvn -version
- path
# java, apache-tomcat, maven
#+TITLE: ~/.bashrc
#+begin_src
..
export JAVA_HOME=/usr/lib/java/jdk1.8.0_65
export TMP_CLASSPATH=$CLASSPATH
export CLASSPATH=.:$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export CLASSPATH=$TMP_CLASSPATH:$CLASSPATH
export CATALINA_HOME=/data/develop/apache-tomcat-8.0.30
export M2_HOME=/data/develop/apache-maven-3.3.9
PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin:$CATALINA_HOME/bin
#+end_src
$ source ~/.bashrc
- apache-maven setting
> backup
cp /data/develop/apache-maven-3.3.9/conf/settings.xml /data/develop/apache-maven-3.3.9/conf/settings.xml-dist
modify settings.xml <--- (this for both global and local)
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- modified -->
<localRepository>/data/develop/dot.m2/repository</localRepository>
..
kys@gig:/data/Project_Pool/check$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T01:41:47+09:00)
Maven home: /data/develop/apache-maven-3.3.9
Java version: 1.8.0_65, vendor: Oracle Corporation
Java home: /usr/lib/java/jdk1.8.0_65/jre
Default locale: ko_KR, platform encoding: UTF-8
OS name: "linux", version: "4.2.0-16-generic", arch: "amd64", family: "unix"
kys@gig:/data/Project_Pool/check$
- OK. fix repoisitory
$ cd ~/.m2
$ ln -s /data/develop/dot.m2/repository repository
apache-tomcat 설치
download tomcat-8 : http://tomcat.apache.org/
> add .bashrc following line
export JAVA_HOME=/usr/lib/java/jdk1.8.0_65
export CATALINA_HOME=/data/develop/apache-tomcat-8.0.30
$PATH ...
kys@gig:~$ source ~/.bashrc
: Apache Standard Taglib 1.2.5 Released
: ..
: Download | Changes
: 2013-11-11 Tomcat Maven Plugin 2.2 Released
: ...
:
: <plugin>
: <groupId>org.apache.tomcat.maven</groupId>
: <artifactId>tomcat7-maven-plugin</artifactId>
: <version>2.2</version>
: </plugin>
:
: or
:
: <plugin>
: <groupId>org.apache.tomcat.maven</groupId>
: <artifactId>tomcat6-maven-plugin</artifactId>
: <version>2.2</version>
copy /data/develop/apache-tomcat-8.0.30/bin/startup.sh /data/develop/apache-tomcat-8.0.30/bin/startup-dist.sh
$CATALINA_HOME/bin/startup.sh
You should get a result similar to:
Using CATALINA_BASE: ...
Using CATALINA_HOME: ..
Using CATALINA_TMPDIR: ..
Using JRE_HOME: /usr/lib/jvm/java-7-openjdk-amd64/
Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Tomcat started.
> add .bashrc following line
export JAVA_HOME=/usr/lib/java/jdk1.8.0_65
export CATALINA_HOME=/data/develop/apache-tomcat-8.0.30
$PATH ...
kys@gig:~$ source ~/.bashrc
: Apache Standard Taglib 1.2.5 Released
: ..
: Download | Changes
: 2013-11-11 Tomcat Maven Plugin 2.2 Released
: ...
:
: <plugin>
: <groupId>org.apache.tomcat.maven</groupId>
: <artifactId>tomcat7-maven-plugin</artifactId>
: <version>2.2</version>
: </plugin>
:
: or
:
: <plugin>
: <groupId>org.apache.tomcat.maven</groupId>
: <artifactId>tomcat6-maven-plugin</artifactId>
: <version>2.2</version>
copy /data/develop/apache-tomcat-8.0.30/bin/startup.sh /data/develop/apache-tomcat-8.0.30/bin/startup-dist.sh
$CATALINA_HOME/bin/startup.sh
You should get a result similar to:
Using CATALINA_BASE: ...
Using CATALINA_HOME: ..
Using CATALINA_TMPDIR: ..
Using JRE_HOME: /usr/lib/jvm/java-7-openjdk-amd64/
Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Tomcat started.
eclipse or Spring
** download: http://www.eclipse.org/downloads/
> extract
: $ tar zxvf ~/folder/eclipse-standard-kepler-R-linux-gtk-x86_64.tar.gz
: $ cd ~/
: >. move eclipse folder ; install to /opt/
: $ sudo mv ~/다운로드/eclipse /opt/
: $ sudo mv ~/eclipse /opt/
$ sudo apt-get install libsvn-java
: error message
: Failed to load JavaHL Library.
: These are the errors that were encountered:
: no libsvnjavahl-1 in java.library.path
: no svnjavahl-1 in java.library.path
: no svnjavahl in java.library.path
: java.library.path = /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
-> http://subclipse.tigris.org/wiki/JavaHL
** issue# JavaHL library
> search "JavaHL library"
$ apt-get install libsvn-java # Use sudo in Ubuntu
Next, find the path where the JavaHL library is installed, as you will need to
know this path for the following instructions:
$ find / -name libsvnjavahl-1.so # Use sudo in Ubuntu
..
-Djava.library.path=</path/to/library>
Example:
-Djava.library.path=/usr/lib/jni
CollabNet Subversion installs into /opt/CollabNet_Subversion. So if you are using that package, you need this:
-Djava.library.path=/opt/CollabNet_Subversion/lib
>> ex. eclipse.ini
..
-showsplash
org.eclipse.platform
-framework
plugins/org.eclipse.osgi_3.4.0.v20080605-1900.jar
-vmargs
-Djava.library.path=/opt/CollabNet_Subversion/lib
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
** spring shourt cut
mkdir /data/develop
mv sts-bundle /data/develop/
/data/develop/sts-bundle/
kys@gig:/data/develop/sts-bundle$ ls -1 /data/develop/sts-bundle/sts-3.7.2.RELEASE/
META-INF
STS <---------------- 실행파일
STS.ini
artifacts.xml
configuration
dropins
features
icon.xpm
license.txt
open_source_licenses.txt
p2
plugins
readme
kys@gig:/data/develop/sts-bundle$
$ # get STS
$ tar -zxvf sts*
$ sudo mv sts-bundle /opt
$ cd /opt/sts-bundle/sts-3.5.1.RELEASE
: $ sudo ln -s /opt/sts-bundle/sts-3.5.1.RELEASE/STS /usr/local/bin/sts
sudo ln -s /data/develop/sts-bundle/sts-3.7.2.RELEASE/STS /usr/local/bin/sts
$ sudo vi /usr/share/applications/sts.desktop
[Desktop Entry]
Name=STS
Exec=/usr/local/bin/sts
Terminal=false
StartupNotify=true
Icon=/data/develop/sts-bundle/icon.xpm
Type=Application
: $ # add extentions vrapper, color-theme, gradle support
: $ # set emacs key binding as default key
** ini
- STS.ini
#+TITLE: sts.ini
#+begin_src
-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms1024m
-XX:MaxPermSize=512m
-Xverify:none
-Xmx1200m
#+end_src
** 메모리 사용 보기
Window > Preferences > General > [check] Show heap Status
** turn off spell check
eclipse performance ; spell check
spell check 해제 : Preferences → General → Editors → Text Editors → Spelling > 체크 해제.
** format
Java > Code Style > Formatter
[Tab policy] Spaces only , indent size: 2
[New Lines] Insert new line
-> [uncheck] in empty class body
-> [uncheck] in empty method body
** theme
- download Eclipse Color Theme
http://eclipsecolorthemes.org/
- line format
Market Place -> Search "Eclipse Color Theme"
install
> download theme apply
> Window > Preferences > General > Appearance > Color Theme
Sunburst
fronttenddev
> line wrapping ; max line width = 120
> [comments] [uncheck] /** and */ on separate lines
> Block comments settigns [uncheck] /* and */ on separate lines
> line width : 120
Web - Css Files - Editor > line width 72 --> 120
- HTML Files : line width 72 --> 120
- JSP Files >
- XML - XML FIles > Editor > line width : 72 --> 120
java install
http://thinkubuntu.tistory.com/entry/%EC%9D%B4%ED%81%B4%EB%A6%BD%EC%8A%A4-%EC%84%A4%EC%B9%98
Eclipse on Ubuntu ubuntu/Java 2013.07.16 11:01
: 1. OPEN Java
: > Ctrl+Alt+T open terminal
: > instll
: $ sudo apt-get install openjdk-7-jdk
2. Oracle Java
> Download
http://www.oracle.com/technetwork/java/javase/downloads/index.html
> if os is Ubutu 13.04
then download amd64 Linux x64
> extract file
: $ tar zxvf jdk-7u25-linux-x64.tar.gz
$ tar xvzf jdk-8u65-linux-x64.tar.gz
check already java installed before then if not continue
$ type java
$ sudo mkdir /usr/lib/java
: move jdk-7u25-linux-x64 to /usr/lib/java/
: $ sudo mv ~/jdk1.7.0_25 /usr/lib/java
$ sudo mv jdk1.8.0_65 /usr/lib/java/
check
$ ls /usr/lib/java
sudo cp /etc/environment /etc/environment-dist
sudo vi /etc/environment
> edit environment and path
$ sudo vi /etc/environment
add JAVA_HOME Path
PATH=".....:/usr/lib/java/jdk1.7.0_25"
: JAVA_HOME=/usr/lib/java/jdk1.7.0_25
JAVA_HOME=/usr/lib/java/jdk1.8.0_65
org.
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
change.
#+TITLE: /etc/environment
#+begin_src
..
JAVA_HOME=/usr/lib/java/jdk1.8.0_65
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME"
..
#+end_src
$ source /etc/environment
check.
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/java/jdk1.8.0_65
: skip
: > /etc/profile FILE_PATH_WHERE
: export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")
- 이 부분은 profile 에서 안하고 ~/.bashrc 에서 처리
vi /etc/profile -> ~/.bashrc 에서 해준다.
; 다만 아래는 고정으로 했기 때문에 자바 버전 변경하면 바꿔야 한다.
#+TITLE: .bashrc
#+begin_src
..
export JAVA_HOME=/usr/lib/java/jdk1.8.0_65
export TMP_CLASSPATH=$CLASSPATH
export CLASSPATH=.:$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export CLASSPATH=$TMP_CLASSPATH:$CLASSPATH
export CATALINA_HOME=/data/develop/apache-tomcat-8.0.30
PATH=$PATH:$JAVA_HOME/bin
..
#+end_src
$source ~/.bashrc
> link execution file => java, javac, javaws
some of Ubuntu package or linux package use OpenJDK,
so don't do set with agreesssively just leave it alone
and "set environment with locally"
** alternative
> update-alternatives
- ex. format
: $ sudo dpkg -l | grep <확인할 패키지 이름> | awk '{print $2}'
: $ sudo update-alternatives --install <link> <name> <path> <priority> <-- 등록
: $ sudo update-alternatives --set <name> <path> <-- 설정
: $ sudo update-alternatives --display gcc <-- 표시
: $ sudo update-alternatives --remove <name> <path> <-- 삭제
; check before link
ls $JAVA_HOME/bin/java
ls $JAVA_HOME/bin/javac
ls $JAVA_HOME/bin/javaws
; let's link with alternative; 숫자가 높을 수록 우선 순위가 높다. 하지만, 이것은
자동 모두 일 때이며, 수동모드도 바꾸면 숫자크기와 관계없이 선택할 수 있다.
;; 아래부부은 자바를 새로 설치 하면, 끝부분 <priority> 1 부분 숫자를 바꾸도록 한다.
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/java/jdk1.8.0_65/bin/java 1
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/java/jdk1.8.0_65/bin/javac 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/java/jdk1.8.0_65/bin/javaws 1
;; 만약, 이전에 버전이 있고, 새로 설치한 경우에 다음처럼 set 을 해 준다.
;; 예를들어, sudo update-alternatives --config editor 하면 아래와 같이 대화형으로
;; 선택할 수 있는 숫자 입력 줄이 나온다. 숫자를 선택하면 바뀐다. 하지만, --set 옵션을 써도 된다.
sudo update-alternatives --config editor
선택 경로 우선순� 상태
------------------------------------------------------------
0 /bin/nano 40 자동 모드
1 /bin/ed -100 수동 모드
2 /bin/nano 40 수동 모드
* 3 /usr/bin/emacs24 0 수동 모드
4 /usr/bin/vim.tiny 10 수동 모드
Press <enter> to keep the current choice[*], or type selection number: 0
- 1.7.x 설치하고 변경 할 때 사용
$ sudo update-alternatives --set java /usr/lib/java/jdk1.8.0.65/bin/java
$ sudo update-alternatives --set javac /usr/lib/java/jdk1.8.0.65/bin/javac
$ sudo update-alternatives --set javaws /usr/lib/java/jdk1.8.0.65/bin/javaws
$ sudo update-alternatives --set java /usr/bin/java
> check instaation
$ java -version
font
sudo apt-get install console-terminus
sudo apt-get install ttf-dejavu
sudo apt-get install ttf-droid <- xx
sudo apt-get install ttf-inconsolata <- xx
sudo apt-get install xfonts-terminus
: 폰트 설치 terminus 는 소프트웨어 센터를 통해서 설치
: http://sourceforge.net/projects/terminus-font/
:
: 참고로 굳이 셋째 방법을 쓰겠다면, [터미널] 또는 alt+F2로 명령창을
: 열어서 gksu nautilus /usr/share/fonts/truetype 로 폴더를 연 후에
: 글꼴이름으로 폴더를 만든 후 그 속에 글꼴을 옮겨주시고, 그 다음에 다시
: 명령창에서 sudo fc-cache -f -v 해주셔야 적용됩니다.
: 우분투의 으뜸 글꼴, 은글꼴은 상당히 잘 만든 글꼴입니다.
: 여기서(http://kldp.net/projects /unfonts)보세요.
:
: 과거에는 백묵글꼴도 설치됐습니다만, 이제는 자동으로 설치되지
: ..'글꼴'을 선택, Korean으로 검색해보시면 꾸러미(ttf-baekmuk)를 보실 수
: 또한 이호석씨가 만든 글꼴도 ttf-alee 꾸러미로 함께 설치됩니다. 이
: 꾸러미에는 반달, 방울, 구슬, 은진, 은진낙서 등 깜찍한 글꼴이
: http://myubuntu.tistory.com/446
- font-manager, install Font Viewer
downlaod font then open Font Viewer
다운로드 한 폰트를 마우스 오르쪽 클릭해서 폰트뷰어로 열고, 우측 상단에 "설치" 를 클릭한다.
sudo apt-get install font-manager
sudo font-manager
Category -> All, Family 창에서 [체크] 아이콘 밑에 X, - 는 각각 사용안함, 삭제를 의미한다.
sudo apt-get install ttf-dejavu
sudo apt-get install ttf-droid <- xx
sudo apt-get install ttf-inconsolata <- xx
sudo apt-get install xfonts-terminus
: 폰트 설치 terminus 는 소프트웨어 센터를 통해서 설치
: http://sourceforge.net/projects/terminus-font/
:
: 참고로 굳이 셋째 방법을 쓰겠다면, [터미널] 또는 alt+F2로 명령창을
: 열어서 gksu nautilus /usr/share/fonts/truetype 로 폴더를 연 후에
: 글꼴이름으로 폴더를 만든 후 그 속에 글꼴을 옮겨주시고, 그 다음에 다시
: 명령창에서 sudo fc-cache -f -v 해주셔야 적용됩니다.
: 우분투의 으뜸 글꼴, 은글꼴은 상당히 잘 만든 글꼴입니다.
: 여기서(http://kldp.net/projects /unfonts)보세요.
:
: 과거에는 백묵글꼴도 설치됐습니다만, 이제는 자동으로 설치되지
: ..'글꼴'을 선택, Korean으로 검색해보시면 꾸러미(ttf-baekmuk)를 보실 수
: 또한 이호석씨가 만든 글꼴도 ttf-alee 꾸러미로 함께 설치됩니다. 이
: 꾸러미에는 반달, 방울, 구슬, 은진, 은진낙서 등 깜찍한 글꼴이
: http://myubuntu.tistory.com/446
- font-manager, install Font Viewer
downlaod font then open Font Viewer
다운로드 한 폰트를 마우스 오르쪽 클릭해서 폰트뷰어로 열고, 우측 상단에 "설치" 를 클릭한다.
sudo apt-get install font-manager
sudo font-manager
Category -> All, Family 창에서 [체크] 아이콘 밑에 X, - 는 각각 사용안함, 삭제를 의미한다.
Video
nvidia
http://www.howopensource.com/2012/10/install-nvidia-geforce-driver-in-ubuntu-12-10-12-04-using-ppa/
Nvidia GTX660M
http://www.geforce.com/drivers
Linux x64 (AMD64/EM64T) Display Driver
Version 352.63
Release Date Mon Nov 16, 2015
Operating System Linux 64-bit
Language Korean
File Size 74.05 MB
http://www.howopensource.com/2012/10/install-nvidia-geforce-driver-in-ubuntu-12-10-12-04-using-ppa/
Nvidia GTX660M
http://www.geforce.com/drivers
Linux x64 (AMD64/EM64T) Display Driver
Version 352.63
Release Date Mon Nov 16, 2015
Operating System Linux 64-bit
Language Korean
File Size 74.05 MB
nautilus
** Turn off trash and delete all trash from Ubuntu 15.04
Files > Edit > Preferences > Behaviour tab and check the option for
"Include a Delete command that bypasses the Rubbish Bin" and you will
have a Delete option on the right click context menu as well as the
standard "Move to the Rubbish Bin"
Alternatively, Shift + Delete will bypass th
** nautilus daemon
- do not kill or remove nautilus -n "it is connected wm" <- bad.
파일 > 편집 > 기본 설정
> [보기] 숨김/백업 파일 보이기 (확인)
> [동작] 실행할 수 있는 텍스트 파일을 누르면 실행 [선택]
> 휴지통을 비우거나 파일을 삭제하기 전에 물어보기 [체크해제]
http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/
find . -name "*.el" -print |xargs grep ".bmk"
Files > Edit > Preferences > Behaviour tab and check the option for
"Include a Delete command that bypasses the Rubbish Bin" and you will
have a Delete option on the right click context menu as well as the
standard "Move to the Rubbish Bin"
Alternatively, Shift + Delete will bypass th
** nautilus daemon
- do not kill or remove nautilus -n "it is connected wm" <- bad.
파일 > 편집 > 기본 설정
> [보기] 숨김/백업 파일 보이기 (확인)
> [동작] 실행할 수 있는 텍스트 파일을 누르면 실행 [선택]
> 휴지통을 비우거나 파일을 삭제하기 전에 물어보기 [체크해제]
http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/
find . -name "*.el" -print |xargs grep ".bmk"
Firewall
- open firewall
$ iptables -F
- hosts.allow, hosts.deny
/etc/hosts.deny
#+TITLE: hosts.deny
#+begin_src
...
ALL : ALL
#+end_src
#+TITLE: hosts.allow
#+begin_src
..
in.telnetd : 10.10.30.0/255.255.255.0
..
#+end_src
$ iptables -F
- hosts.allow, hosts.deny
/etc/hosts.deny
#+TITLE: hosts.deny
#+begin_src
...
ALL : ALL
#+end_src
#+TITLE: hosts.allow
#+begin_src
..
in.telnetd : 10.10.30.0/255.255.255.0
..
#+end_src
vsftp-ftp
> site: https://help.ubuntu.com/lts/serverguide/ftp-server.html
sudo apt-get install vsftpd
cd /etc/
sudo cp vsftpd.conf vsftpd.conf-dist
sudo vi vsftpd.conf
#+TITLE: vsftpd.conf
#+begin_src
..
uncomment following line
#write_enable=YES
change following line
listen_ipv6=YES --> NO
..
#+end_src
> check ftp daemon direcory
cat /etc/passwd |grep ftp
mkidr /data/srv
usermod -d /data/ftp ftp
# chown root.ftp /data/srv
-- vsftpd
kys@gig:/etc/xinetd.d$ cat /etc/xinetd.d/vsftpd
#+TITLE: vsftpd in xinetd
#+begin_src
service ftp
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
per_source = 5
instances = 200
no_access = 10.1.1.10
banner_fail = /etc/vsftpd.busy
log_on_success += PID HOST DURATION
log_on_failure += HOST
}
#+end_src
kys@gig:/etc/xinetd.d$
[root@localhost xinetd.d]# service xinetd start
or
[root@localhost xinetd.d]# service xinetd restart
: * telnetd
: 1. instal vsftp or telnetd
: > ex. centos telnet-server --> yum install telnet-server
:
: 2. Client가 telnet 으로 접속 시도할 경우, 디폴트 포트는 23
: > /etc/services
:
: 3. etc/xinetd.d/telnet 파일에 밑의 내용 삽입.
: 설정되어있다면 disable이 yes로 되어 있는것을 no로 변환
: telnet 말고 /etc/xinetd.conf에서도 수정 가능.
sudo vi telnet
#+TITLE: tlenetd
#+begin_src
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
#+end_src
- xinetd restart
service xinetd restart
sudo apt-get install vsftpd
cd /etc/
sudo cp vsftpd.conf vsftpd.conf-dist
sudo vi vsftpd.conf
#+TITLE: vsftpd.conf
#+begin_src
..
uncomment following line
#write_enable=YES
change following line
listen_ipv6=YES --> NO
..
#+end_src
> check ftp daemon direcory
cat /etc/passwd |grep ftp
mkidr /data/srv
usermod -d /data/ftp ftp
# chown root.ftp /data/srv
-- vsftpd
kys@gig:/etc/xinetd.d$ cat /etc/xinetd.d/vsftpd
#+TITLE: vsftpd in xinetd
#+begin_src
service ftp
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
per_source = 5
instances = 200
no_access = 10.1.1.10
banner_fail = /etc/vsftpd.busy
log_on_success += PID HOST DURATION
log_on_failure += HOST
}
#+end_src
kys@gig:/etc/xinetd.d$
[root@localhost xinetd.d]# service xinetd start
or
[root@localhost xinetd.d]# service xinetd restart
: * telnetd
: 1. instal vsftp or telnetd
: > ex. centos telnet-server --> yum install telnet-server
:
: 2. Client가 telnet 으로 접속 시도할 경우, 디폴트 포트는 23
: > /etc/services
:
: 3. etc/xinetd.d/telnet 파일에 밑의 내용 삽입.
: 설정되어있다면 disable이 yes로 되어 있는것을 no로 변환
: telnet 말고 /etc/xinetd.conf에서도 수정 가능.
sudo vi telnet
#+TITLE: tlenetd
#+begin_src
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
#+end_src
- xinetd restart
service xinetd restart
initial install packages
** firefox
- restore previous settings
modify Path in -> ~/.mozill/firefox/profiles.ini
** telegram
- start and fix in luncher
> change download directory -> ~/tmp
** sshd with OpenSSH
install sshd ---> openssh-server.html
https://help.ubuntu.com/lts/serverguide/openssh-server.html
sudo apt-get install openssh-client
sudo apt-get install openssh-server
$ sudo vi /etc/ssh/sshd_config
#+TITLE: /etc/ssh/sshd_config
#+begin_src
...
# change Port to --> 22222
: leave it port 22 -e Port to --> 22
uncomment ListenAddress 0.0.0.0
comment ListenAddress ::
sshd 가 공개 키 기반의 로그인 신뢰서를 허용하게 하려면, /etc/ssh/sshd_config 다음 부분 변경
PubkeyAuthentication yes
If the line is already present, then ensure it is not commented out.
서버에서 로그인하기 전에 보여줄 배너로 /etc/issue.net 파일의 내용을 표시
Banner /etc/issue.net
In the /etc/ssh/sshd_config file.
...
#+end_src
sudo service ssh restart
** sudo apt-get install xinetd
- restore previous settings
modify Path in -> ~/.mozill/firefox/profiles.ini
** telegram
- start and fix in luncher
> change download directory -> ~/tmp
** sshd with OpenSSH
install sshd ---> openssh-server.html
https://help.ubuntu.com/lts/serverguide/openssh-server.html
sudo apt-get install openssh-client
sudo apt-get install openssh-server
$ sudo vi /etc/ssh/sshd_config
#+TITLE: /etc/ssh/sshd_config
#+begin_src
...
# change Port to --> 22222
: leave it port 22 -e Port to --> 22
uncomment ListenAddress 0.0.0.0
comment ListenAddress ::
sshd 가 공개 키 기반의 로그인 신뢰서를 허용하게 하려면, /etc/ssh/sshd_config 다음 부분 변경
PubkeyAuthentication yes
If the line is already present, then ensure it is not commented out.
서버에서 로그인하기 전에 보여줄 배너로 /etc/issue.net 파일의 내용을 표시
Banner /etc/issue.net
In the /etc/ssh/sshd_config file.
...
#+end_src
sudo service ssh restart
** sudo apt-get install xinetd
Emacs
- server module 활성화
1. ~/dot
(load (concat emacs-lib-path "dot/init-server.el"))
(defun my-server-start () "server-start"
(interactive)
(load (concat emacs-lib-path "dot/init-server.el")))
2. 프로그램 등록: (emacs client)
시스템 설정 > 키보드 > 바로가기 > 사용자 설정 바로가기 > 등록
emacsclient -c -n
3. 단축키 지정: Control - Alt - q
4. use: startup emacs (with normail click in laucher)
then
click: ctrl + ALt + q
- hanyu
> install font: chinese.msyh.ttf
> load init.hanyu
; emacs: (load (concat emacs-lib-path "dot/init-multi-lang.el")) ; i.hanyu v.2
> key change: Alt+shift+Space
1. ~/dot
(load (concat emacs-lib-path "dot/init-server.el"))
(defun my-server-start () "server-start"
(interactive)
(load (concat emacs-lib-path "dot/init-server.el")))
2. 프로그램 등록: (emacs client)
시스템 설정 > 키보드 > 바로가기 > 사용자 설정 바로가기 > 등록
emacsclient -c -n
3. 단축키 지정: Control - Alt - q
4. use: startup emacs (with normail click in laucher)
then
click: ctrl + ALt + q
- hanyu
> install font: chinese.msyh.ttf
> load init.hanyu
; emacs: (load (concat emacs-lib-path "dot/init-multi-lang.el")) ; i.hanyu v.2
> key change: Alt+shift+Space
add language, xim setting, Gnome Key change
1. 시스템 설정 > 언어지원 > 한국어, 중국어(간체), 러시아어, 일본어 추가
2. 시스템 기본 언설 설정을 "한국어"로 바꾼다.
3. 시스템 설정 > 하드웨어 > 키보드 로 이동한다.
[바로가기] - [자판입력] 에서
다음입력 소스로 전환 변경 -> Super(윈도우즈 키) + Space
이전 입력 소스로 번환 -> Shiftp + Super + Space 로 바꾼다.
4. fcitx 설정 변경
> [Global Config] 혹은 [전역설정] 항목에서
입력기 전환 (Trigger Input Method) => Hangul - Shift+Space 가 되도록 한다.
file:hangul_key_input_fcitx.png
file:hangul_key_input_fcitx.odt
5. Before setting - backup-1
cd ~/.config
tar cvf fcitx_dist.tar fcitx
tar cvf fcitx-qimpanel_dist.tar fcitx-qimpanel/
6. 화면 상단의 카보드 입력기 Fcitx 를 클릭한다.
: > Default: ubuntu 15.10
: ; Super(winkey) + space <--- 설치된 입력기간 순회
: ; Ctrl+Space <--- 이전 입력기로 이동 반복 <>=== 이맥스 마크 시작/종료와 충돌 됨
: --> Ctrl+Space --> 한/영 키로 변경
: > change
: 화면상단 문자입력기 Panel 에 키보드 모양 클릭 > Configure Fcitx 클릭
: ; 키보드 - 영어(미국) 기본 설정 상태에서 > 상단 [전역 설정] 클릭
: ; 맨위 상 단에 [입력기 전환] > [Ctrl+Space] -- [Hangul] 에서
: [Ctrl+Space] 를 클릭하면 키를 입력할 수 있음.
: 여기서 Ctrl+Shift+Space 로 눌러서 바꾼다.
: (이렇게 하면 이맥스의 원래 키 지정으로 되어 었던 게 오버라이드 됨)
7. After Setting - backup-2
cd ~/.config
tar cvf fcitx_v1.tar fcitx
tar cvf fcitx-qimpanel_v1.tar fcitx-qimpanel/
; 터미널에서 emacs 입력키를 무력화 shell 에서 실행하는 방법-> $ XMODIFIERS="" emacs
- search box <-- HUD
> turn off search box ; file, web, <-- use other tool (see below sections)
(Unity Tweak Tool 섹션 참조)
> turn off the search box that appears when I press Alt or Hangul Key
; System Settings --> Keyboard --> Short-cuts. --> 실행아이콘
--> [허드를 표시할 키] --> "한/영키 + Backslash" 로 변경
--> [검색] --> "Alt+백스페이스" 로 변경
8. gnome global key define
- global gnome key binding with customize
> keyboard: add user definiton
ㅁ. window
Lower window :
Lower window to the other window: -- super + (download arrow)
Vertically Max. window: super + (up arrow)
Horizentially Max. Window: super + (righ arrow)
ㅁ. Screen Shot
screen shot and save file dialog: Ctrl + F2
screen shot with region select and copy it clipboard: Ctrl + F1
ㅁ. emacsclient: Ctrl + Alt + Q
- alt + ` ; open laucher
2. 시스템 기본 언설 설정을 "한국어"로 바꾼다.
3. 시스템 설정 > 하드웨어 > 키보드 로 이동한다.
[바로가기] - [자판입력] 에서
다음입력 소스로 전환 변경 -> Super(윈도우즈 키) + Space
이전 입력 소스로 번환 -> Shiftp + Super + Space 로 바꾼다.
4. fcitx 설정 변경
> [Global Config] 혹은 [전역설정] 항목에서
입력기 전환 (Trigger Input Method) => Hangul - Shift+Space 가 되도록 한다.
file:hangul_key_input_fcitx.png
file:hangul_key_input_fcitx.odt
5. Before setting - backup-1
cd ~/.config
tar cvf fcitx_dist.tar fcitx
tar cvf fcitx-qimpanel_dist.tar fcitx-qimpanel/
6. 화면 상단의 카보드 입력기 Fcitx 를 클릭한다.
: > Default: ubuntu 15.10
: ; Super(winkey) + space <--- 설치된 입력기간 순회
: ; Ctrl+Space <--- 이전 입력기로 이동 반복 <>=== 이맥스 마크 시작/종료와 충돌 됨
: --> Ctrl+Space --> 한/영 키로 변경
: > change
: 화면상단 문자입력기 Panel 에 키보드 모양 클릭 > Configure Fcitx 클릭
: ; 키보드 - 영어(미국) 기본 설정 상태에서 > 상단 [전역 설정] 클릭
: ; 맨위 상 단에 [입력기 전환] > [Ctrl+Space] -- [Hangul] 에서
: [Ctrl+Space] 를 클릭하면 키를 입력할 수 있음.
: 여기서 Ctrl+Shift+Space 로 눌러서 바꾼다.
: (이렇게 하면 이맥스의 원래 키 지정으로 되어 었던 게 오버라이드 됨)
7. After Setting - backup-2
cd ~/.config
tar cvf fcitx_v1.tar fcitx
tar cvf fcitx-qimpanel_v1.tar fcitx-qimpanel/
; 터미널에서 emacs 입력키를 무력화 shell 에서 실행하는 방법-> $ XMODIFIERS="" emacs
- search box <-- HUD
> turn off search box ; file, web, <-- use other tool (see below sections)
(Unity Tweak Tool 섹션 참조)
> turn off the search box that appears when I press Alt or Hangul Key
; System Settings --> Keyboard --> Short-cuts. --> 실행아이콘
--> [허드를 표시할 키] --> "한/영키 + Backslash" 로 변경
--> [검색] --> "Alt+백스페이스" 로 변경
8. gnome global key define
- global gnome key binding with customize
> keyboard: add user definiton
ㅁ. window
Lower window :
Lower window to the other window: -- super + (download arrow)
Vertically Max. window: super + (up arrow)
Horizentially Max. Window: super + (righ arrow)
ㅁ. Screen Shot
screen shot and save file dialog: Ctrl + F2
screen shot with region select and copy it clipboard: Ctrl + F1
ㅁ. emacsclient: Ctrl + Alt + Q
- alt + ` ; open laucher
permission check
- default permission change
> check permission
cd /data
ls -alh
> change permission (this will change all the prmission)
(be carefull)
: sudo find [PATH] -type [d|f] -exec chmod 755 {} \;
: change all sub directory with perm. 755 == rwxr-xr-x
find . -type d -exec chmod -R 755 {} \;
find . -type f -exec chmod -R 644 {} \;
755 -> -rwxr-xr-x ; directory default
644 -> -rw-r--r-- ; file default
> mount permisiion
sudo chown (First_Account).(First_Account) /data
; /media is ubuntu linux default auto mount directory
sudo chown (First_Account).(First_Account) /media
- fstab option
> assign user
UUID=123.. /media/mnt_point ntfs defaults 0 0
> Add to it the umask, uid and gid masks like this, be sureto change uid, gid
UUID=123.. /media/mnt_point ntfs defaults,umask=007,uid=1000,gid=1000 0 0
> check permission
cd /data
ls -alh
> change permission (this will change all the prmission)
(be carefull)
: sudo find [PATH] -type [d|f] -exec chmod 755 {} \;
: change all sub directory with perm. 755 == rwxr-xr-x
find . -type d -exec chmod -R 755 {} \;
find . -type f -exec chmod -R 644 {} \;
755 -> -rwxr-xr-x ; directory default
644 -> -rw-r--r-- ; file default
> mount permisiion
sudo chown (First_Account).(First_Account) /data
; /media is ubuntu linux default auto mount directory
sudo chown (First_Account).(First_Account) /media
- fstab option
> assign user
UUID=123.. /media/mnt_point ntfs defaults 0 0
> Add to it the umask, uid and gid masks like this, be sureto change uid, gid
UUID=123.. /media/mnt_point ntfs defaults,umask=007,uid=1000,gid=1000 0 0
change user home and restore (First_Account)
- login with (Secondary_Account)
- user account modify home directory
open terminal ( Ctrl - Alt - T)
then change to root
$sudo su -
or
$sudo -i
- user modify with home
usermod -d /data/"First_Account" "First_Account"
- check
cat /etc/passwd >> check First_Account directory
mv /home/(First_Account) /data/ <- move /home/(First_Account) to /data/(First_Account)
ls /data
(reboot)
- user account modify home directory
open terminal ( Ctrl - Alt - T)
then change to root
$sudo su -
or
$sudo -i
- user modify with home
usermod -d /data/"First_Account" "First_Account"
- check
cat /etc/passwd >> check First_Account directory
mv /home/(First_Account) /data/ <- move /home/(First_Account) to /data/(First_Account)
ls /data
(reboot)
restore backup files
- if problem occur when mount
; xfs
/dev/sdc2 /media/Recordings xfs rw,user,auto 0 0
or if cannot writer partion after mount
- sudo chmod ug+rwx /media/Recordings
; disk add
sudo su -
ls -alh /dev/sd*
- extract and move
terminal: gnome default Short cut is -> Ctrl+Alt+T
cd /data
touch /data/test.txt
tar cvf (backuped_user_home).tar /home/(user_home)
(reboot)
; xfs
/dev/sdc2 /media/Recordings xfs rw,user,auto 0 0
or if cannot writer partion after mount
- sudo chmod ug+rwx /media/Recordings
; disk add
sudo su -
ls -alh /dev/sd*
- extract and move
terminal: gnome default Short cut is -> Ctrl+Alt+T
cd /data
touch /data/test.txt
tar cvf (backuped_user_home).tar /home/(user_home)
(reboot)
add disk with auto mount option
- disk add then auto mount to /data
Disk > Properties > Change Mount Option > Auto mount when system start마운트
; Mount Point --> /data
; (shell) make directory
mkdir /data
- fstab
#+TITLE: /etc/fstab
#+begin_src
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=2bb0fb06-7c1d-4bc2-b725-9333e66a55c3 / xfs defaults 0 1
# swap was on /dev/sda5 during installation
UUID=1ae909b2-3baa-45c2-bea4-09bf56150c4d none swap sw 0 0
#
UUID=3a68d535-0016-4f18-8df3-d4f5dd258bb1 /data ext4 defaults 0 1
#+end_src
- UUID could be found like following
$sudo ls -alh /dev/sd*
: brw-rw---- 1 root disk 8, 0 12월 26 12:16 /dev/sda
: brw-rw---- 1 root disk 8, 1 12월 26 12:16 /dev/sda1
: brw-rw---- 1 root disk 8, 2 12월 26 12:16 /dev/sda2
: brw-rw---- 1 root disk 8, 5 12월 26 12:16 /dev/sda5
: brw-rw---- 1 root disk 8, 16 12월 26 12:16 /dev/sdb
: brw-rw---- 1 root disk 8, 17 12월 26 12:16 /dev/sdb1
$ ls -l /dev/disk/by-uuid
: 2:16 1ae909b2-3baa-45c2-bea4-09bf56150c4d -> ../../sda5
: 2:16 2bb0fb06-7c1d-4bc2-b725-9333e66a55c3 -> ../../sda1
: 2:16 3a68d535-0016-4f18-8df3-d4f5dd258bb1 -> ../../sdb1
Disk > Properties > Change Mount Option > Auto mount when system start마운트
; Mount Point --> /data
; (shell) make directory
mkdir /data
- fstab
#+TITLE: /etc/fstab
#+begin_src
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=2bb0fb06-7c1d-4bc2-b725-9333e66a55c3 / xfs defaults 0 1
# swap was on /dev/sda5 during installation
UUID=1ae909b2-3baa-45c2-bea4-09bf56150c4d none swap sw 0 0
#
UUID=3a68d535-0016-4f18-8df3-d4f5dd258bb1 /data ext4 defaults 0 1
#+end_src
- UUID could be found like following
$sudo ls -alh /dev/sd*
: brw-rw---- 1 root disk 8, 0 12월 26 12:16 /dev/sda
: brw-rw---- 1 root disk 8, 1 12월 26 12:16 /dev/sda1
: brw-rw---- 1 root disk 8, 2 12월 26 12:16 /dev/sda2
: brw-rw---- 1 root disk 8, 5 12월 26 12:16 /dev/sda5
: brw-rw---- 1 root disk 8, 16 12월 26 12:16 /dev/sdb
: brw-rw---- 1 root disk 8, 17 12월 26 12:16 /dev/sdb1
$ ls -l /dev/disk/by-uuid
: 2:16 1ae909b2-3baa-45c2-bea4-09bf56150c4d -> ../../sda5
: 2:16 2bb0fb06-7c1d-4bc2-b725-9333e66a55c3 -> ../../sda1
: 2:16 3a68d535-0016-4f18-8df3-d4f5dd258bb1 -> ../../sdb1
fresh os install
- add disk with auto mount
> menu
system settings > add user > secondary account with admin role (for emergency)
(reboot)
> setup networks
; system settings > wired
ip, dns ( google. 8.8.8.8 )
; skip wireless
> add additonal laguage pack
; system settings > Language Support > download install then adjust items
(Corean, Simplified Chinese, Russian, Japan)
(reboot)
> menu
system settings > add user > secondary account with admin role (for emergency)
(reboot)
> setup networks
; system settings > wired
ip, dns ( google. 8.8.8.8 )
; skip wireless
> add additonal laguage pack
; system settings > Language Support > download install then adjust items
(Corean, Simplified Chinese, Russian, Japan)
(reboot)
Installation - Ubuntu 15.10
* Installation - Ubuntu 15.10
- Start
> un-plug outer monitor or secondary monitore
; insert dvd & install
> Select language
; Your favorite language then Install Click
> do not connect now > continue
> partision
/ 117,760 xfs (sda1)
swap 10,334 swap (sda5)
> name: kys
computer: gig
password:
- Start
> un-plug outer monitor or secondary monitore
; insert dvd & install
> Select language
; Your favorite language then Install Click
> do not connect now > continue
> partision
/ 117,760 xfs (sda1)
swap 10,334 swap (sda5)
> name: kys
computer: gig
password:
Thursday, September 24, 2015
7 Of The Fastest Growing Fruit Trees
http://makingdiyfun.com/7-of-the-fastest-growing-fruit-trees/
1. Peaches & Nectarines.
2. Cherries.
3. Apple Tree.
4. Pear Tree.
5. Apricot tree.
6. Figs.
1. Peaches & Nectarines.
2. Cherries.
3. Apple Tree.
4. Pear Tree.
5. Apricot tree.
6. Figs.
Monday, September 21, 2015
39 Data Visualization Tools for Big Data
https://blog.profitbricks.com/39-data-visualization-tools-for-big-data/
Monday, August 17, 2015
How to upgrade windows 10
How to upgrade windows 10
- use windows Auto update
- if it fail like message..> message > goto Windows Control Panel > WIndows Update > see update log "Windows 10 Home K upgrade fail" -> see code> https://www.microsoft.com/ko-kr/software-download/windows10
- with Install Tools
[작업 방법 2. Windows 10 설치 도구로 진행하는 방법] 아래의 링크를 클릭하여 설치 파일 다운로드 페이지로 이동합니다. https://www.microsoft.com/ko-kr/software-download/windows10 다운로드 페이지에서 PC의 환경에 따라 지금 도구 다운로드(32비트 버전) 혹은 지금 도구 다운로드(64비트 버전)를 클릭합니다. MediaCreationTool.exe(64bit의 경우, MediaCreationToolx64.exe)를 저장 후, 실행합니다. 지금 이 PC 업그레이드 항목을 선택하고 다음 버튼을 클릭하여 진행 절차에 따라 진행합니다. (다른 PC용 설치 미디어 만들기를 통해서 설치 미디어 제작 후 업그레이드를 진행해보실 수도 있습니다.)
- Prepare
다음을 확인합니다. 인터넷 연결(인터넷 서비스 공급자 요금이 적용될 수 있음) 컴퓨터, USB 또는 외장형 드라이브에 다운로드에 사용할 만큼 충분한 데이터 저장 공간 확보 미디어를 만들려는 경우 4GB 이상의 공간이 있는 빈 USB 또는 DVD(및 DVD 버너) 모든 콘텐츠가 삭제되므로 비어 있는 USB 또는 DVD를 사용하는 것이 좋습니다. 시스템 요구 사항을 확인합니다. 처음으로 운영 체제를 설치하는 경우 Windows 제품 키(xxxxx-xxxxx-xxxxx-xxxxx-xxxxx)가 필요합니다. 제품 키와 제품 키가 필요한 경우에 대한 자세한 내용은 FAQ 페이지를 참조하세요. Enterprise 버전을 다운로드하려면 볼륨 라이선스 서비스 센터에 로그인합니다.
미디어 생성 도구 를 사용하여 Windows를 다운로드합니다. 이 도구는 Windows 7, 8.1 및 10을 실행하는 고객을 위한 최상의 다운로드 환경을 제공합니다. 도구에는 다음이 포함됩니다.
다운로드 속도에 최적화된 파일 형식 USB 및 DVD용 기본 제공 미디어 생성 옵션 ISO 파일 형식으로의 선택적인 변환
- select option
> Version
N is made for the EU market and does not include Windows Media Player.
KN is made for the Korean Market and does not include Windows Media Player or an Instant Messenger.
VL are volume license editions for business enterprise customers and uses MAK (Multiple Activation Keys) or KMS (Key Management Server) to activate.
-> if you installed KN or N Version Median Pack can be downloaded following link http://www.microsoft.com/ko-kr/download/details.aspx?id=48231
> architecture: 64 or 32bit
08월18일(화)_01:50:03+UTC_Y2015
Monday, July 20, 2015
Connecting to a Postgresql Database in OpenOffice - how to connect postgres in openoffice
how to connect postgres in openoffice
--> https://wiki.openoffice.org/wiki/Base/connectivity/PostgreSQL
--> https://wiki.openoffice.org/wiki/Base/connectivity/PostgreSQL
Base/connectivity/PostgreSQL
< Base | connectivity
Connecting to a Postgresql Database
Using the SDBC Driver
Download the SDBC driver from PostgreSQL SDBC Driver This page has additional information on the driver.
Installation with OOo 2.x
DO NOT unzip the driver.- Go to menu bar
- Open Tools/Extension Manager

- Highlight My Extensions
- Click on Add... Button
- Go to folder where SDBC driver was downloaded
- Click Open
- Make sure that it is enabled
- Close extension manager
- Shutdown OOo including the Quick Starter. You might have to use Task Manager in order to shutdown soffice.bin
- Start OOo Base
- The Database Wizard window will open up
- Select Database...

Note: Your Postgresql database must already exist.
- Click on Connect to existing database radio button
- Scroll down to postgresql
- Click Next>>
- Connection Setting...

- In the text box type: dbname=NameOfDatbase host=localhost. NameOfDatabase is the name of the Postgresql database that you are connecting to and use localhost if the Postgresql server is on your computer.
- Click Next>>
- Set up user authentication...

- Enter user name of Postgresql database
- Click Test Connection

- Type in database password and click OK
- If test connection is successful click OK
- Click Next>>

- Click Finish
- Type in OOo Base file name for this front end to your Postgresql database
Thursday, May 28, 2015
MS-Word 에서 Emacs Key 지정
1. 기존에 있는 명령어에서 지정
Word Option > 왼쪽창 [사용자 지정]
> 오른쪽 창 아래 [사용자 지정]
> 창 [키보드 사용자 지정]
> 좌측 범주 [모든 명령] 선택
--> 오른쪽 창 --> (아래 선택) -> 새 바로가기 키 지정 -> 지정
C-b – CharLeft 현재키: 추가 Ctrl+B
C-f – CharRight ->
C-e – EndOfLine
C-p – LineUp
C-n – LineDown
C-a – StartOfLine
;; 붙여넣기는 키 중복으로 윈도우즈에서 보류한다. -> C-v – PageDown
2. 글자 하나 지우는 것과 라인 끝까지 지우는 건 매크로 지정으로 처리
Word Option > 좌측창 [기본설정] > 우측창 - Word에서 갖아 많이 사용하는 옵션
> [리본 메뉴에 개발 도구 탭 표시] 체크 함
> 화면 상단 우측에 [보기] 메뉴 우측에 [개발 도구] 메뉴가 표시 됨
화면상단 [매크로 기록] 클릭 ->
매크로 이름 지정 -> "DeleteCharacter"
매크로 할당 위치 -> 키보드 클릭 -> (작업수행) -> 화면상단 -> [매크로 기록 중지] 클릭
Here’s the procedure, in MS Word 2011 for Mac.
Tools → Macros → Record Macro
Give it a name with no spaces
Click the keyboard button to assign a keystroke to it
Select OK
Type the set of key strokes
Tools → Macros → Stop Recording
C-d – [DeleteCharacter] (as a macro)
C-k – [KillLine] (as a macro)
Word Option > 왼쪽창 [사용자 지정]
> 오른쪽 창 아래 [사용자 지정]
> 창 [키보드 사용자 지정]
> 좌측 범주 [모든 명령] 선택
--> 오른쪽 창 --> (아래 선택) -> 새 바로가기 키 지정 -> 지정
C-b – CharLeft 현재키: 추가 Ctrl+B
C-f – CharRight ->
C-e – EndOfLine
C-p – LineUp
C-n – LineDown
C-a – StartOfLine
;; 붙여넣기는 키 중복으로 윈도우즈에서 보류한다. -> C-v – PageDown
2. 글자 하나 지우는 것과 라인 끝까지 지우는 건 매크로 지정으로 처리
Word Option > 좌측창 [기본설정] > 우측창 - Word에서 갖아 많이 사용하는 옵션
> [리본 메뉴에 개발 도구 탭 표시] 체크 함
> 화면 상단 우측에 [보기] 메뉴 우측에 [개발 도구] 메뉴가 표시 됨
화면상단 [매크로 기록] 클릭 ->
매크로 이름 지정 -> "DeleteCharacter"
매크로 할당 위치 -> 키보드 클릭 -> (작업수행) -> 화면상단 -> [매크로 기록 중지] 클릭
Here’s the procedure, in MS Word 2011 for Mac.
Tools → Macros → Record Macro
Give it a name with no spaces
Click the keyboard button to assign a keystroke to it
Select OK
Type the set of key strokes
Tools → Macros → Stop Recording
C-d – [DeleteCharacter] (as a macro)
C-k – [KillLine] (as a macro)
한글 & 중국어 입력 -- dot/init-multi.el
dot/init-multi.el
;;;; ----------------------------
;;;; key define
;; Input method and key binding configuration.
;; http://stackoverflow.com/questions/12032231/is-it-possible-to-alternate-two-input-methods-in-emacs
(setq alternative-input-methods
'(
("korean-hangul" . [?\C-\\])
("chinese-py-punct" . [?\C-|])
; ("chinese-py-punct" . [?\M- ])
("korean-hangul" . [?\M- ]) ;; m-spc > hangul
("chinese-py-punct" . [?\S-\M- ]) ;; m-s-spc > chinese
; ("russian-computer" . [?\C-\M-|])
; ("german-postfix" . [?\C-\\])
))
(setq default-input-method
(caar alternative-input-methods))
(defun toggle-alternative-input-method (method &optional arg interactive)
(if arg
(toggle-input-method arg interactive)
(let ((previous-input-method current-input-method))
(when current-input-method
(deactivate-input-method))
(unless (and previous-input-method
(string= previous-input-method method))
(activate-input-method method)))))
(defun reload-alternative-input-methods ()
(dolist (config alternative-input-methods)
(let ((method (car config)))
(global-set-key (cdr config)
`(lambda (&optional arg interactive)
,(concat "Behaves similar to `toggle-input-method', but uses \""
method "\" instead of `default-input-method'")
(interactive "P\np")
(toggle-alternative-input-method ,method arg interactive))))))
(reload-alternative-input-methods)
;;;; ----------------------------
;;;; ----------------------------
;;;; set font
;(if (not (member '("-*-courier new-normal-r-*-*-13-*-*-*-c-*-fontset-chinese" . "fontset-chinese") fontset-alias-alist))
; (progn
; (create-fontset-from-fontset-spec ; chinese fontset
; "-*-Courier New-normal-r-*-*-14-*-*-*-c-*-fontset-chinese,
; chinese-gb2312:-*-MS Song-normal-r-*-*-12-*-*-*-c-*-gb2312*-*,
; chinese-big5-1:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*,
; chinese-big5-2:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*" t)
; (setq default-frame-alist
; (append
; '((font . "fontset-chinese"))
; default-frame-alist))
; )
;)
(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
;;(frame-parameter nil 'font)?????fontset-default???
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default" 'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))
;;;; ----------------------------------------
;;;; -- eim
;(load (concat emacs-lib-path "dot/init-china.el"))
;;;; -- use eim input
(setq load-path (append load-path (list (concat emacs-lib-path "eim"))))
(autoload 'eim-use-package "eim" "Another emacs input method")
;; Tooltip 暂时还不好用
(setq eim-use-tooltip nil)
(register-input-method "eim-wb" "euc-cn" 'eim-use-package "五笔" "汉字五笔输入法" "wb.txt")
(register-input-method "eim-py" "euc-cn" 'eim-use-package "拼音" "汉字拼音输入法" "py.txt")
;; 用 ; 暂时输入英文
(require 'eim-extra)
;(global-set-key ";" 'eim-insert-ascii)
(set-frame-font "Inconsolata 12")
;(set-face-attribute 'default nil :height 100)
;;;; end of chinese
;;;; --------------------------------------------------------------------------------
;;;; ----------------------------
;;;; key define
;; Input method and key binding configuration.
;; http://stackoverflow.com/questions/12032231/is-it-possible-to-alternate-two-input-methods-in-emacs
(setq alternative-input-methods
'(
("korean-hangul" . [?\C-\\])
("chinese-py-punct" . [?\C-|])
; ("chinese-py-punct" . [?\M- ])
("korean-hangul" . [?\M- ]) ;; m-spc > hangul
("chinese-py-punct" . [?\S-\M- ]) ;; m-s-spc > chinese
; ("russian-computer" . [?\C-\M-|])
; ("german-postfix" . [?\C-\\])
))
(setq default-input-method
(caar alternative-input-methods))
(defun toggle-alternative-input-method (method &optional arg interactive)
(if arg
(toggle-input-method arg interactive)
(let ((previous-input-method current-input-method))
(when current-input-method
(deactivate-input-method))
(unless (and previous-input-method
(string= previous-input-method method))
(activate-input-method method)))))
(defun reload-alternative-input-methods ()
(dolist (config alternative-input-methods)
(let ((method (car config)))
(global-set-key (cdr config)
`(lambda (&optional arg interactive)
,(concat "Behaves similar to `toggle-input-method', but uses \""
method "\" instead of `default-input-method'")
(interactive "P\np")
(toggle-alternative-input-method ,method arg interactive))))))
(reload-alternative-input-methods)
;;;; ----------------------------
;;;; ----------------------------
;;;; set font
;(if (not (member '("-*-courier new-normal-r-*-*-13-*-*-*-c-*-fontset-chinese" . "fontset-chinese") fontset-alias-alist))
; (progn
; (create-fontset-from-fontset-spec ; chinese fontset
; "-*-Courier New-normal-r-*-*-14-*-*-*-c-*-fontset-chinese,
; chinese-gb2312:-*-MS Song-normal-r-*-*-12-*-*-*-c-*-gb2312*-*,
; chinese-big5-1:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*,
; chinese-big5-2:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*" t)
; (setq default-frame-alist
; (append
; '((font . "fontset-chinese"))
; default-frame-alist))
; )
;)
(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
;;(frame-parameter nil 'font)?????fontset-default???
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default" 'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))
;;;; ----------------------------------------
;;;; -- eim
;(load (concat emacs-lib-path "dot/init-china.el"))
;;;; -- use eim input
(setq load-path (append load-path (list (concat emacs-lib-path "eim"))))
(autoload 'eim-use-package "eim" "Another emacs input method")
;; Tooltip 暂时还不好用
(setq eim-use-tooltip nil)
(register-input-method "eim-wb" "euc-cn" 'eim-use-package "五笔" "汉字五笔输入法" "wb.txt")
(register-input-method "eim-py" "euc-cn" 'eim-use-package "拼音" "汉字拼音输入法" "py.txt")
;; 用 ; 暂时输入英文
(require 'eim-extra)
;(global-set-key ";" 'eim-insert-ascii)
(set-frame-font "Inconsolata 12")
;(set-face-attribute 'default nil :height 100)
;;;; end of chinese
;;;; --------------------------------------------------------------------------------
Wednesday, May 20, 2015
Audacity - Tutorial - Recording Computer Playback on Windows
http://manual.audacityteam.org/o/man/tutorial_recording_computer_playback_on_windows.html
....
http://manual.audacityteam.org/o/man/tutorial_recording_computer_playback_on_mac.html
2) In Audacity, if you want to record from a different source (such as the Line Input or an external USB device), click on Audacity > Preferences then the Devices section and select the input you want to record from in the Recording section. See step 7 above for an illustration.
Tutorial - Recording Computer Playback on Windows
Choosing the recording device in Audacity
Choose "MME" or "Windows DirectSound" in the Audio Host box of Device Toolbar and the sound device's input for recording computer playback in the third (Recording Device) box of Device Toolbar. You can also choose this recording device at Recording Device in Devices Preferences.
You must play the audio you want to record using the same sound device that has the "Stereo Mix" or similar input.
You cannot play audio through an HDMI output or through a headset,
headphones or speakers that connect via USB or wirelessly then record
that playback using the stereo mix input of the built-in sound device. Choose the Windows WASAPI host (next section) if you want to record playback of a USB, wireless or external sound device.
Transport > Software Playthrough (on/off) should be off when recording computer playback, so if Software Playthrough has a check mark, click that item to turn it off. Otherwise you will hear and record echoes or distorted sound. |
Windows WASAPI loopback recording
On Windows Vista, Windows 7 or Windows 8 only you can choose the Windows WASAPI Audio Host and then the (loopback) input in the Recording Device box. Choose the loopback input for the computer playback device you will be listening to (for example, "Speakers (loopback)" ). The loopback input records computer playback even if your sound device lacks its own stereo mix or similar input:Playback and Recording sliders
The behavior of the Audacity playback and recording sliders may vary according to the sound device you are recording from.....
http://manual.audacityteam.org/o/man/tutorial_recording_computer_playback_on_mac.html
Tutorial - Recording Computer Playback on Mac
Use Soundflower
Soundflower is a free open source system add-on for Mac computers that allows you to route what is playing on the computer digitally back to the input without using a cable. Set Soundflower as your system output device, then in Audacity, set Soundflower as your recording device.- Download the latest version of Soundflower. It is possible that older versions of Soundflower may work better on older versions of OS X. Older versions of Soundflower may be obtained if necessary at https://code.google.com/p/soundflower/downloads/list.
- If the downloaded zip file does not extract automatically, double-click it to extract the DMG file it contains, or use your favorite extraction utility. To install the extracted DMG file, double-click it to mount it. In the DMG itself, double-click the PKG file.
- After opening the PKG file, you may see a warning that the certificate for the installer has expired. Press "Show Certificate" to review the certificate then choose "Continue".
- Then run through the standard installer steps. Save your work in other applications, then press the button in the installer to restart your Mac.
- Choose Apple Menu > System Preferences and select the Sound preferences panel.
- In the Sound preferences panel, choose the Output tab, then
select "Soundflower (2ch)" from the "Select a device for sound output:"
list and turn the Output volume up.
- In the same panel, choose the Input tab, select "Soundflower (2ch)" and and turn the Input volume up.
- At this point you will no longer be able to hear what is playing on the computer. The sound output of the computer is being sent to Soundflower.
- Click on the "Sound Effects" tab, and from the "Play sound
effects through" dropdown menu choose "Line Out", "Headphones" or
"Internal Speakers" (whichever is appropriate for your system).
- This will route some system alert sounds (such as Mail
alert sounds) to the Line Out or Internal Speakers and not to
Soundflower. Thus these sounds will not be recorded by Audacity.Some
Macintosh applications are better behaved than others when it comes to
alert sounds. Tests on a recent iMac running 10.7.2 show that Mail and
TextEdit alert sounds will not be recorded with the above setup, but
iCal and Yahoo Messenger alert sounds will be recorded. To be
safe you should disable the sound on any iCal alerts that may occur
while you are recording, and quit any other program that may make an
alert sound.
- This will route some system alert sounds (such as Mail
alert sounds) to the Line Out or Internal Speakers and not to
Soundflower. Thus these sounds will not be recorded by Audacity.Some
Macintosh applications are better behaved than others when it comes to
alert sounds. Tests on a recent iMac running 10.7.2 show that Mail and
TextEdit alert sounds will not be recorded with the above setup, but
iCal and Yahoo Messenger alert sounds will be recorded. To be
safe you should disable the sound on any iCal alerts that may occur
while you are recording, and quit any other program that may make an
alert sound.
- Close the System Preferences window.
- Start Audacity.
- In Audacity's Device Toolbar, select Built-in Output
or similar as Playback Device and Soundflower (2ch)
as Recording Device.
- Click on the Transport menu and make sure that "Software Playthrough" is checked.
- Go to the application that will be playing the sound you want to record. For example, start Safari and go to a website that plays sound clips. Start some audio playing.
- Click on the recording level meters (beside the microphone symbol) to begin monitoring:
- You should now be able to hear the sound playing on your computer.
- Now click Record to record anything playing on your computer.
To set things back to "normal" so you can hear audio playing on your computer without running Audacity
1) Click on Apple Menu > System Preferences then the Sound panel, and select the Output tab. Select "Line Out", "Internal Speakers" or "Headphones" in the output device list. See step 3 above for an illustration.2) In Audacity, if you want to record from a different source (such as the Line Input or an external USB device), click on Audacity > Preferences then the Devices section and select the input you want to record from in the Recording section. See step 7 above for an illustration.
Tuesday, May 12, 2015
Emacs - Chinese setting
;;;; dot ----------------------------
;;;; 1. load with default (with hangul)
;;;; 2. load chinese setting -> chinese ==> f10
;;;; 3. change chinese -> korean ==> M-SPC = change font in english mode with chinese
;;;; 4. change korean -> chinese ==> f2 = my-inconsolata-hangul
(defun my-inconsolata-china ()
(interactive) "set font"
(set-frame-font "Inconsolata 12")
; (set-face-attribute 'default nil :height 100)
(load "d:/Pkg/emacs/lib/dot/init-china.el"))
(global-set-key [f10] 'my-inconsolata-china)
;(my-inconsolata-china)
(defun my-inconsolata-hangul ()
(interactive) "load set hangul"
; (set-frame-font "Inconsolata 12")
; (set-face-attribute 'default nil :height 100)
(activate-input-method "korean-hangul"))
(global-unset-key (kbd "M-SPC"))
(global-set-key (kbd "M-SPC") 'my-change2-chinese)
(defun my-change2-chinese ()
(interactive) "set hangul input"
; (set-keyboard-coding-system 'chinese-iso-8bit) ; input
; (set-language-environment "Chinese-GB18030")
(load "d:/Pkg/emacs/lib/dot/init-china.el")
(toggle-input-method)
)
;(global-unset-key [f2] 'my-inconsolata-hangul)
(global-set-key [f2] 'my-inconsolata-hangul)
;;;; init-china.el --------------------------------
;;;; --------------------------------------------------------------------------------
;;;; -- Chinese
;;;; -- chinese language
(set-keyboard-coding-system 'chinese-iso-8bit) ; input
;(set-selection-coding-system 'chinese-iso-8bit) ; copy/paste
;(setq w32-enable-synthesized-fonts t)
(if (not (member '("-*-courier new-normal-r-*-*-13-*-*-*-c-*-fontset-chinese" . "fontset-chinese") fontset-alias-alist))
(progn
(create-fontset-from-fontset-spec ; chinese fontset
"-*-Courier New-normal-r-*-*-14-*-*-*-c-*-fontset-chinese,
chinese-gb2312:-*-MS Song-normal-r-*-*-12-*-*-*-c-*-gb2312*-*,
chinese-big5-1:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*,
chinese-big5-2:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*" t)
(setq default-frame-alist
(append
'((font . "fontset-chinese"))
default-frame-alist))
)
)
(set-language-environment "Chinese-GB18030")
;(setq file-name-coding-system 'gb18030)
;;set font
; Microsoft JhengHei / ???? /
; (set-fontset-font "fontset-default"
; 'gb18030 '("Microsoft YaHei" . "unicode-bmp"))
;;?????????????? :pixelsize=18:foundry=monotype:weight=medium:slant=i:width=normal
;;????????M-x describe-char??????
;; (if (eq system-type 'windows-nt)
;; (set-default-font "Courier New")
;; (set-default-font "Bitstream Vera Sans Mono"))
;(set-frame-font "YaHei Consolas Hybrid-12")
(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
;;(frame-parameter nil 'font)?????fontset-default???
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default" 'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))
;;;; ----------------------------------------
;;;; -- eim
;(load (concat emacs-lib-path "dot/init-china.el"))
;;;; -- use eim input
(setq load-path (append load-path (list (concat emacs-lib-path "eim"))))
(autoload 'eim-use-package "eim" "Another emacs input method")
;; Tooltip 暂时还不好用
(setq eim-use-tooltip nil)
(register-input-method "eim-wb" "euc-cn" 'eim-use-package "五笔" "汉字五笔输入法" "wb.txt")
(register-input-method "eim-py" "euc-cn" 'eim-use-package "拼音" "汉字拼音输入法" "py.txt")
;; 用 ; 暂时输入英文
(require 'eim-extra)
;(global-set-key ";" 'eim-insert-ascii)
(set-frame-font "Inconsolata 12")
;(set-face-attribute 'default nil :height 100)
;;;; end of chinese
;;;; --------------------------------------------------------------------------------
;;;; 1. load with default (with hangul)
;;;; 2. load chinese setting -> chinese ==> f10
;;;; 3. change chinese -> korean ==> M-SPC = change font in english mode with chinese
;;;; 4. change korean -> chinese ==> f2 = my-inconsolata-hangul
(defun my-inconsolata-china ()
(interactive) "set font"
(set-frame-font "Inconsolata 12")
; (set-face-attribute 'default nil :height 100)
(load "d:/Pkg/emacs/lib/dot/init-china.el"))
(global-set-key [f10] 'my-inconsolata-china)
;(my-inconsolata-china)
(defun my-inconsolata-hangul ()
(interactive) "load set hangul"
; (set-frame-font "Inconsolata 12")
; (set-face-attribute 'default nil :height 100)
(activate-input-method "korean-hangul"))
(global-unset-key (kbd "M-SPC"))
(global-set-key (kbd "M-SPC") 'my-change2-chinese)
(defun my-change2-chinese ()
(interactive) "set hangul input"
; (set-keyboard-coding-system 'chinese-iso-8bit) ; input
; (set-language-environment "Chinese-GB18030")
(load "d:/Pkg/emacs/lib/dot/init-china.el")
(toggle-input-method)
)
;(global-unset-key [f2] 'my-inconsolata-hangul)
(global-set-key [f2] 'my-inconsolata-hangul)
;;;; init-china.el --------------------------------
;;;; --------------------------------------------------------------------------------
;;;; -- Chinese
;;;; -- chinese language
(set-keyboard-coding-system 'chinese-iso-8bit) ; input
;(set-selection-coding-system 'chinese-iso-8bit) ; copy/paste
;(setq w32-enable-synthesized-fonts t)
(if (not (member '("-*-courier new-normal-r-*-*-13-*-*-*-c-*-fontset-chinese" . "fontset-chinese") fontset-alias-alist))
(progn
(create-fontset-from-fontset-spec ; chinese fontset
"-*-Courier New-normal-r-*-*-14-*-*-*-c-*-fontset-chinese,
chinese-gb2312:-*-MS Song-normal-r-*-*-12-*-*-*-c-*-gb2312*-*,
chinese-big5-1:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*,
chinese-big5-2:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5*-*" t)
(setq default-frame-alist
(append
'((font . "fontset-chinese"))
default-frame-alist))
)
)
(set-language-environment "Chinese-GB18030")
;(setq file-name-coding-system 'gb18030)
;;set font
; Microsoft JhengHei / ???? /
; (set-fontset-font "fontset-default"
; 'gb18030 '("Microsoft YaHei" . "unicode-bmp"))
;;?????????????? :pixelsize=18:foundry=monotype:weight=medium:slant=i:width=normal
;;????????M-x describe-char??????
;; (if (eq system-type 'windows-nt)
;; (set-default-font "Courier New")
;; (set-default-font "Bitstream Vera Sans Mono"))
;(set-frame-font "YaHei Consolas Hybrid-12")
(set-fontset-font "fontset-default" 'han '("Microsoft YaHei". "unicode-bmp"))
;;(frame-parameter nil 'font)?????fontset-default???
(set-fontset-font (frame-parameter nil 'font) 'cjk-misc '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'bopomofo '("Microsoft YaHei" . "unicode-bmp"))
(set-fontset-font "fontset-default" 'gb18030 '("Microsoft YaHei". "unicode-bmp"))
(set-fontset-font (frame-parameter nil 'font) 'symbol '("Microsoft YaHei". "unicode-bmp"))
;;;; ----------------------------------------
;;;; -- eim
;(load (concat emacs-lib-path "dot/init-china.el"))
;;;; -- use eim input
(setq load-path (append load-path (list (concat emacs-lib-path "eim"))))
(autoload 'eim-use-package "eim" "Another emacs input method")
;; Tooltip 暂时还不好用
(setq eim-use-tooltip nil)
(register-input-method "eim-wb" "euc-cn" 'eim-use-package "五笔" "汉字五笔输入法" "wb.txt")
(register-input-method "eim-py" "euc-cn" 'eim-use-package "拼音" "汉字拼音输入法" "py.txt")
;; 用 ; 暂时输入英文
(require 'eim-extra)
;(global-set-key ";" 'eim-insert-ascii)
(set-frame-font "Inconsolata 12")
;(set-face-attribute 'default nil :height 100)
;;;; end of chinese
;;;; --------------------------------------------------------------------------------
Thursday, April 23, 2015
How to use SQL Query in emacs org-mode
- How to use SQL Query in emacs org-mode
(org-mode 에서 Postgres SQL 사용)
* Install Postgres
- omitted
* set up for SQL-mode
- not always necessary
;; (load (concat emacs-lib-path "dot/init-sql.el")) ; postgres v.1
#+begin_src emacs-lisp
;;
;; usage: M-x sql-connect --> "if fail" --> retry again!
;; M-x sql-postgres
;; sql-send-region : C-c C-r
;; sql-send-buffer : C-c C-b
;;
;-- 1. Open sql file ( chagne buffer sql-mode )
;-- 2. M-x sql-connect --> emacsdb
;-- input buffer *SQL-postgres* or *SQL*
;-- C-c C-r : send region
;-- C-c C-b : send buffer
;-- output is --> *SQL* buffer
;-- DB:emacsdb / Table:headers
;select title, sender, receiver, datetime_txt, size, sent_received from headers where datetime_txt like '%12-10%';
;select title, sender, receiver, datetime_txt, size, sent_received from headers where title like '%체크%';
;-- DB:emacsdb / Table:phonebook
;SELECT d_project, string_agg(fullname, ', '), string_agg(email, ',') AS title_list FROM phonebook where d_project like '%cctv%' GROUP BY 1 ;
;SELECT d_project, string_agg(fullname, ', ') AS title_list FROM phonebook GROUP BY 1 ;
;SELECT d_project, string_agg(email, ', ') AS title_list FROM phonebook GROUP BY 1 ;
;SELECT d_project, string_agg(email, ', ') AS email_list FROM phonebook where d_project like '%drone%' GROUP BY 1 ;
;SELECT fullname, email FROM phonebook where d_attend='y' order by fullname;
;select column_name, data_type, character_maximum_length from INFORMATION_SCHEMA.COLUMNS where table_name = 'phonebook';
;-- quit --> \q
(setq sql-postgres-login-params
'((user :default "kys")
(database :default "emacsdb")
(server :default "localhost")
(port :default 5432)))
;; call toggle-truncate-lines in sql-interactive-mode-hook.
(add-hook 'sql-interactive-mode-hook
(lambda ()
(toggle-truncate-lines t)))
(setq sql-connection-alist
'((emacsdb (sql-product 'postgres)
(sql-port 5432)
(sql-server "localhost")
(sql-user "kys")
(sql-database "emacsdb")
)
(kysdb2 (sql-product 'postgres)
(sql-port 5432)
(sql-server "localhost")
(sql-user "kys")
(sql-database "kysdb")
)
)
)
(defun my-sql-server1 ()
(interactive)
(my-sql-connect 'postgres 'server1))
(defun my-sql-server2 ()
(interactive)
(my-sql-connect 'postgres 'server2))
(defun my-sql-connect (product connection)
;; remember to set the sql-product, otherwise, it will fail for the first time
;; you call the function
(setq sql-product product)
(sql-connect connection))
(defun my-sql-connect (product connection)
;; load the password
(require my-password "my-pass")
;; update the password to the sql-connection-alist
(let ((connection-info (assoc connection sql-connection-alist))
(sql-password (car (last (assoc connection my-sql-password)))))
(delete sql-password connection-info)
(nconc connection-info `((sql-password ,sql-password)))
(setq sql-connection-alist (assq-delete-all connection sql-connection-alist))
(add-to-list 'sql-connection-alist connection-info))
;; connect to database
(setq sql-product product)
(sql-connect connection))
#+end_src
* enable sql mode with org-mode initial file
- init-org.el
#+begin_src emacs-lisp
(org-babel-do-load-languages
'org-babel-load-languages
'(
(css . t)
; (dot . t)
(emacs-lisp . t)
(js . t)
(gnuplot . t)
; (latex . t)
(ledger . t)
; (makefile . t)
(sh . t)
(python . t)
(ruby . t)
(R . t)
(sh . t)
(sql . t) ;; <-- this is for SQL-MODE
; (sqlite . t)
))
#+end_src
* org file - ex. sample.org
** Method-1. All of sql will be setted by the header Properties
단락 헤더 아래에 모든 쿼리가 Property 에 속성에 대입되어 처리 된다.
* Postgres
:PROPERTIES:
:LANGUAGE: sql
:engine: postgresql
:exports: result
:cmdline: -p 5432 -h localhost -U kys -d emacsdb PGPASSWORD=my-pass
:END:
#+END_SRC sql
SELECT d_project, string_agg(email, ', ') AS email_list FROM phonebook where d_project like '%drone%' GROUP BY 1 ;
#+END_SRC
** Method-2. Property is will be setted by per src
개발 src 속성으로 처리 된다.
#+BEGIN_SRC sql :engine postgresql :exports results :cmdline -p 5432 -h localhost -U kys -d emacsdb PGPASSWORD=my-pass
select fullname, email from phonebook limit 3;
#+END_SRC
#+RESULTS:
| fullname | email |
|----------+-------------------|
| 임--K | bin--@--lus.co.kr |
| 방--D | yhb--@--us.co.kr |
| 엄--S | syo--@--\.com |
#+BEGIN_SRC sql :engine postgresql :exports results :cmdline -p 5432 -h otherhost.com -U kys -d emacsdb PGPASSWORD=my-pass
select fullname, email from phonebook limit 3;
#+END_SRC
#+RESULTS:
| fullname | email |
|----------+-------------------|
| 임--K | bin--@--lus.co.kr |
| 방--D | yhb--@--us.co.kr |
| 엄--S | syo--@--\.com |
* UTF-8
International Language support
** MS-Windows - UTF-8 with Msys+MinGW
- Hangul with org-mode babel
http://www.iac.es/sieinvens/siepedia/pmwiki.php?n=SIEminars.EnvironmentVariables
** ruby check
- plan text
#+begin_src ruby :exports both :results output
puts "Howdy!"
#+end_src
#+RESULTS:
: Howdy!
- hangul
#+begin_src ruby :exports: both :results output
puts "Howdy!"
puts "한글로처리해라"
#+end_src
evalute
(setenv "LANG" "ko_KR.UTF-8")
(setenv "LC_ALL" "ko_KR.UTF-8")
or
(setenv "LANG" "C.UTF-8")
(setenv "LC_ALL" "C.UTF-8")
#+BEGIN_SRC ruby :exports both :results output
puts RUBY_VERSION
puts __ENCODING__
#+END_SRC
-- shell test
(setenv "LANG" "cp949")
(setenv "LC_ALL" "cp949")
#+BEGIN_SRC ruby :exports both :results output
puts RUBY_VERSION
puts __ENCODING__
#+END_SRC
#+RESULTS:
: 1.9.3
: UTF-8
(setenv "LANG" "EUC-KR")
(setenv "LC_ALL" "EUC-KR")
#+BEGIN_SRC ruby :exports both :results output
puts RUBY_VERSION
puts __ENCODING__
#+END_SRC
#+name:
: 1.9.3
: UTF-8
- shell test
#+begin_src sh :exports both :results output
printenv |grep LANG
#+end_src
#+RESULTS:
: NLS_LANG=KOREAN_KOREA.KO16MSWIN949
: LANG=ko_KR.UTF-8
> check filename
#+begin_src sh :exports both :results output
ls ~/download/*.txt
#+end_src
#+RESULTS:
: /d/home/download/set_var.txt
: /d/home/download/test.txt
- .cshrc
#+begin_src
setenv LANG C.UTF-8
setenv LC_ALL C.UTF-8
setenv LC_CTYPE C.UTF-8
setenv LC_NUMERIC C.UTF-8
setenv LC_TIME C.UTF-8
setenv LC_COLLATE C.UTF-8
setenv LC_MONETARY C.UTF-8
setenv LC_MESSAGES C.UTF-8
#+end_src
- .emacs_bash
#+begin_src
export TERM=msys
# gettext
export OUTPUT_CHARSET=UTF-8
export TZ=KST+9
#export LANG=ko_KR.UTF-8
#export LANG=C.UTF-8
export LC_ALL='C'
export TPUT_COLORS=256
export HOSTNAME=msys-bash
#export PATH=~/.packer:$PATH:/c/Program\ Files\ \(x86\)/Git/bin
alias open="explorer"
export MSYSTEM=MSYS
export PATH=.:/usr/local/bin:/bin:/mingw/bin:$PATH
#+end_src
.bashrc
#+begin_src
# .bashrc
export SHELL='d:/Pkg/MinGW/msys/1.0/bin/bash.exe'
export LANG="C.UTF-8"
export LC_CTYPE="C.UTF-8"
export LC_NUMERIC="C.UTF-8"
export LC_TIME="C.UTF-8"
export LC_COLLATE="C.UTF-8"
export LC_MONETARY="C.UTF-8"
export LC_MESSAGES="C.UTF-8"
export LC_ALL="C.UTF-8"
#+end_src
How to use SQL Query in emacs org-mode (org-mode 에서 Postgres SQL 사용)
>
org-sql-blog
- How to use SQL Query in emacs org-mode (org-mode 에서 Postgres SQL 사용)
Install Postgres
- omitted
set up for SQL-mode
- not always necessary
;; (load (concat emacs-lib-path "dot/init-sql.el")) ; postgres v.1
;; ;; usage: M-x sql-connect --> "if fail" --> retry again! ;; M-x sql-postgres ;; sql-send-region : C-c C-r ;; sql-send-buffer : C-c C-b ;; ;-- 1. Open sql file ( chagne buffer sql-mode ) ;-- 2. M-x sql-connect --> emacsdb ;-- input buffer *SQL-postgres* or *SQL* ;-- C-c C-r : send region ;-- C-c C-b : send buffer ;-- output is --> *SQL* buffer ;-- DB:emacsdb / Table:headers ;select title, sender, receiver, datetime_txt, size, sent_received from headers where datetime_txt like '%12-10%'; ;select title, sender, receiver, datetime_txt, size, sent_received from headers where title like '%체크%'; ;-- DB:emacsdb / Table:phonebook ;SELECT d_project, string_agg(fullname, ', '), string_agg(email, ',') AS title_list FROM phonebook where d_project like '%cctv%' GROUP BY 1 ; ;SELECT d_project, string_agg(fullname, ', ') AS title_list FROM phonebook GROUP BY 1 ; ;SELECT d_project, string_agg(email, ', ') AS title_list FROM phonebook GROUP BY 1 ; ;SELECT d_project, string_agg(email, ', ') AS email_list FROM phonebook where d_project like '%drone%' GROUP BY 1 ; ;SELECT fullname, email FROM phonebook where d_attend='y' order by fullname; ;select column_name, data_type, character_maximum_length from INFORMATION_SCHEMA.COLUMNS where table_name = 'phonebook'; ;-- quit --> \q (setq sql-postgres-login-params '((user :default "kys") (database :default "emacsdb") (server :default "localhost") (port :default 5432))) ;; call toggle-truncate-lines in sql-interactive-mode-hook. (add-hook 'sql-interactive-mode-hook (lambda () (toggle-truncate-lines t))) (setq sql-connection-alist '((emacsdb (sql-product 'postgres) (sql-port 5432) (sql-server "localhost") (sql-user "kys") (sql-database "emacsdb") ) (kysdb2 (sql-product 'postgres) (sql-port 5432) (sql-server "localhost") (sql-user "kys") (sql-database "kysdb") ) ) ) (defun my-sql-server1 () (interactive) (my-sql-connect 'postgres 'server1)) (defun my-sql-server2 () (interactive) (my-sql-connect 'postgres 'server2)) (defun my-sql-connect (product connection) ;; remember to set the sql-product, otherwise, it will fail for the first time ;; you call the function (setq sql-product product) (sql-connect connection)) (defun my-sql-connect (product connection) ;; load the password (require my-password "my-pass") ;; update the password to the sql-connection-alist (let ((connection-info (assoc connection sql-connection-alist)) (sql-password (car (last (assoc connection my-sql-password))))) (delete sql-password connection-info) (nconc connection-info `((sql-password ,sql-password))) (setq sql-connection-alist (assq-delete-all connection sql-connection-alist)) (add-to-list 'sql-connection-alist connection-info)) ;; connect to database (setq sql-product product) (sql-connect connection))
enable sql mode with org-mode initial file
- init-org.el
(org-babel-do-load-languages 'org-babel-load-languages '( (css . t) ; (dot . t) (emacs-lisp . t) (js . t) (gnuplot . t) ; (latex . t) (ledger . t) ; (makefile . t) (sh . t) (python . t) (ruby . t) (R . t) (sh . t) (sql . t) ;; <-- this is for SQL-MODE ; (sqlite . t) ))
org file - ex. sample.org
Method-1. All of sql will be setted by the header Properties
단락 헤더 아래에 모든 쿼리가 Property 에 속성에 대입되어 처리 된다.
- Postgres
#+END_SRC sql SELECT d_project, string_agg(email, ', ') AS email_list FROM phonebook where d_project like '%drone%' GROUP BY 1 ; #+END_SRC
Method-2. Property is will be setted by per src
개발 src 속성으로 처리 된다.
fullname | |
---|---|
임–K | bin–@–lus.co.kr |
방–D | yhb–@–us.co.kr |
엄–S | syo–@–\.com |
fullname | |
---|---|
임–K | bin–@–lus.co.kr |
방–D | yhb–@–us.co.kr |
엄–S | syo–@–\.com |
UTF-8
International Language support
MS-Windows - UTF-8 with Msys+MinGW
- Hangul with org-mode babel
http://www.iac.es/sieinvens/siepedia/pmwiki.php?n=SIEminars.EnvironmentVariables
ruby check
- plan text
puts "Howdy!"
Howdy!
- hangul
puts "Howdy!" puts "한글로처리해라"
evalute (setenv "LANG" "ko_KR.UTF-8") (setenv "LC_ALL" "ko_KR.UTF-8") or (setenv "LANG" "C.UTF-8") (setenv "LC_ALL" "C.UTF-8")
puts RUBY_VERSION puts __ENCODING__
– shell test (setenv "LANG" "cp949") (setenv "LC_ALL" "cp949")
puts RUBY_VERSION puts __ENCODING__
1.9.3 UTF-8
(setenv "LANG" "EUC-KR") (setenv "LC_ALL" "EUC-KR")
puts RUBY_VERSION puts __ENCODING__
1.9.3 UTF-8
- shell test
printenv |grep LANG
NLS_LANG=KOREAN_KOREA.KO16MSWIN949 LANG=ko_KR.UTF-8
> check filename
ls ~/download/*.txt
/d/home/download/set_var.txt /d/home/download/test.txt
- .cshrc
setenv LANG C.UTF-8 setenv LC_ALL C.UTF-8 setenv LC_CTYPE C.UTF-8 setenv LC_NUMERIC C.UTF-8 setenv LC_TIME C.UTF-8 setenv LC_COLLATE C.UTF-8 setenv LC_MONETARY C.UTF-8 setenv LC_MESSAGES C.UTF-8
- .emacs_bash
export TERM=msys # gettext export OUTPUT_CHARSET=UTF-8 export TZ=KST+9 #export LANG=ko_KR.UTF-8 #export LANG=C.UTF-8 export LC_ALL='C' export TPUT_COLORS=256 export HOSTNAME=msys-bash #export PATH=~/.packer:$PATH:/c/Program\ Files\ \(x86\)/Git/bin alias open="explorer" export MSYSTEM=MSYS export PATH=.:/usr/local/bin:/bin:/mingw/bin:$PATH
.bashrc
# .bashrc export SHELL='d:/Pkg/MinGW/msys/1.0/bin/bash.exe' export LANG="C.UTF-8" export LC_CTYPE="C.UTF-8" export LC_NUMERIC="C.UTF-8" export LC_TIME="C.UTF-8" export LC_COLLATE="C.UTF-8" export LC_MONETARY="C.UTF-8" export LC_MESSAGES="C.UTF-8" export LC_ALL="C.UTF-8"
04월24일(금)_00:05:56+UTC_Y2015
Tuesday, April 14, 2015
Disable Windows Media Player
How to Disable Windows Media Player in Windows 7
http://www.ofzenandcomputing.com/disable-windows-media-player-windows-7/
Control Panel -> Program Add or Delete -> [Windows Function Use / Delete] -> Media Function -> delete three check
제어판 -> 프로그램 추가/제거 -> 윈도우즈 기능 사용/사용안함 -> 미디어 기능 -> 3개 항목 모두 제거
Subscribe to:
Posts (Atom)
-
* postgres - pgmodelear ** new version > download: https://github.com/pgmodeler/pgmodeler sudo apt-get install qt-sdk sudo apt-get ins...
-
Consolas also work with VS2010 Consolas 폰트가 설치만으로 사용가능하지만 이름 선택을 "Consolas "로 하고 싶다면 아래와 같이 한다. 다운로드 링크: http://www.microsof...
-
how to connect postgres in openoffice --> https://wiki.openoffice.org/wiki/Base/connectivity/PostgreSQL Base/connectivity/PostgreS...