[Internet Explorer] 즐겨찾기 모음 순서 바꾸기

즐겨찾기 모음에 즐겨찾기 순서를 바꾸고 싶을 때,

“즐겨찾기(A)” -> “즐겨찾기 관리(O)…” -> “즐겨찾기 모음”으로 들어가서,순서를 바꾸고 싶은 항목을 클릭한 후, Alt 키를 누른 채로 키보드의 위/아래 방향키를 누르면 순서가 바뀐다.

[Windows] Apache 2.4 + PHPv5

Apache는 apache lounge의 것을 이용하자.

https://www.apachelounge.com/download/

설치 방법은 zip 파일 내부의 ReadMe.txt를 읽어보면 충분하다. 간단히 보면 httpd.conf의 SRVROOT 경로를 설치한 폴더로 바꿔준 후, httpd.exe -k install 후 서비스 시작하면 된다.

PHP는 moniwiki를 사용하기 위해서 설치한 거라 php5를 설치했다. apache 서비스는 중지하고 설치한다.

https://windows.php.net/download/ 에서 php5를 받아 d:\php5 에 풀어준다. apache의 httpd.conf 에 다음을 추가해 준다.

AddHandler application/x-httpd-php .php

AddType application/x-httpd-php .php .html

LoadModule php5_module “d:/php5/php5apache2_4.dll”

PHPIniDir “d:/php5”

php5 설치 디렉토리 안의 php.ini-development 를 php.ini로 복사해준다.

apache 서비스를 시작!

다음과 같은 에러는 extension을 설치하지 않았을 때 나는 에러로 http://php.net/manual/it/install.windows.extensions.php 를 참조하여 해결한다.

“Call to undefined function mb_strwidth()”

해결 방법을 간단히 적으면, extension_dir = d:\php5\ext 와 같이 바꾸고, ;extension=php_mbstring.dll 과 같이 comment되어 있는 줄의 ;를 지워 comment를 해제한다.

[Windows] UltraMon의 대체 freeware – ZBar

듀얼 이상의 모니터에서 각각의 모니터에 작업표시줄을 붙이고 싶을 때, UltraMon이란 프로그램을 많이 쓴다.

Free한, 아예 commercial free한 프로그램으로 ZBar를 사용하기도 하는 것 같다.

http://www.zhornsoftware.co.uk/zbar

[Windows] Ditto – Clipboard 프로그램

복사하기/붙여넣기를 하다보면 이전에 복사했던 걸 다시 붙여넣고 싶을 때가 있다.

Ditto(https://ditto-cp.sourceforge.io/)를 사용하면 된다. Ctrl + ‘ 을 누르면 이전에 복사했던 목록이 나온다.

[Raspberry Pi] 라즈베리파이에 미디어위키(MediaWiki) 설치

라즈베리파이의 OS, Raspbian에서는 패키지를 제공하므로 매우 간단하다.

sudo apt-get install mediawiki

 

설치하면 apache2의 available configuration에 mediawiki라는 새로운 configuration(/etc/apache2/conf-available/mediawiki.conf)이 생긴다.

아래의 Alias를 풀어서 /mediawiki 로 접근해도 된다.

#Alias /mediawiki /var/lib/mediawiki

 

난 VirtualHost를 이용한다.

/etc/apache2/sites-available/wiki.dasomoli.org.conf

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        ServerName wiki.dasomoli.org

        ServerAdmin dasomoli@gmail.com
        DocumentRoot /var/lib/mediawiki

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/wiki_error.log
        CustomLog ${APACHE_LOG_DIR}/wiki.access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        Include conf-available/serve-cgi-bin.conf
</VirtualHost>

 

이제 mediawiki configuration을 enable 하자

sudo a2enconf mediawiki

wiki.dasomoli.org site도 enable하자

sudo a2ensite wiki.dasomoli.org.conf

apache2도 reload하자

sudo service apache2 reload

 

이제 wiki.dasomoli.org에 접속해서 mediawiki 설치를 시작한다.

설치가 끝나면 LocalSettings.php 파일을 저장할 수 있는데, 이 파일을 /etc/mediawiki/LocalSettings.php 로 저장한다.

다시 wiki.dasomoli.org로 접속해보면. 설치된 위키를 볼 수 있다!

 

[Microsoft Word] 이전 위치로 돌아가기 단축키

웹브라우저를 쓴다던가, Eclipse 같은 툴을 쓰면 이전 위치로 돌아가고자 할 때, Alt + ‘<-‘ 를 사용해서 돌아가곤 한다. 그러나 마이크로소프트 워드 문서를 볼 때는 이게 안먹어서 뭐려나 하고 찾아보니 다음과 같다.

Shift + F5: 이전 편집 위치(Editing position)

Ctrl + Alt + ‘Z’: 이전 커서 위치

긴 문서를 볼 때는 이 기능이 꼭 필요하다.

참고: https://superuser.com/questions/938328/is-there-a-keyboard-shortcut-to-return-to-previous-position

ATOM editor 사용법

생활코딩에 Atom editor 사용법(https://opentutorials.org/module/1579)이 있길래, 보면서 몇가지 적는다. 적다보니, 내가 뭘 또 이런 것까지 적고 있나 싶긴 한데… ^^;;

  • Toggle tree view:  View / Toggle Tree view (Ctrl + \)
  • Find in buffer: Ctrl + F
  • Find Next: F3, Find Previous: Shift + F3
  • Find File: Ctrl + P. 파일명 일부 혹은 패턴만 쳐도 찾아준다.
  • 아래쪽 오른쪽에 나온 Auto detect 된 File type이 나온다. 변경하고 싶다면 클릭 후 변경.
  • Toggle Developer tools: View / Developer / Toggle Developer tools (Ctrl + Shift + I)
  • Stylesheet: Atom 에디터 내의 element들의 lesscss를 수정할 수 있다. File / Stylesheet
  • Plugins:
    • emmet: HTML tag 작성 시, syntax 작성 후 Tab 혹은 Ctrl+E 하면 html로 풀어준다.
      • !: html template 입력
      • li*20: <li></li> 가 20개 입력.
      • li>a*20: <li> <a href=””></a><a href=””></a>…<a href=””></a> </li>
      • (li>a)*20: <li><a href=””></a></li> <li><a href=””></a></li>…<li><a href=””></a></li>
      • Syntax: https://docs.emmet.io/cheat-sheet/, 더 자세히는 https://docs.emmet.io/abbreviations/syntax/, CSS도 abbreviation 제공(https://docs.emmet.io/css-abbreviations/)
        • Child: >
          • div>ul>li
            <div>
                <ul>
                    <li></li>
                </ul>
            </div>
        • Sibling: +
          • div+p+bq
            <div></div>
            <p></p>
            <blockquote></blockquote>
        • Climb up: ^
          • nav>ul>li^^a
            <nav>
                <ul>
                    <li></li>
                </ul>
            </nav>
            <a href=""></a>
        • Multiplication: *
          • a*10
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
            <a href=""></a>
        • Grouping: ()
          • nav>ul>(li>a)*5
            <nav>
                <ul>
                    <li><a href=""></a></li>
                    <li><a href=""></a></li>
                    <li><a href=""></a></li>
                    <li><a href=""></a></li>
                    <li><a href=""></a></li>
                </ul>
            </nav>
        • Attiribute:
          • ID attribite: #
            • nav#navigation
              <nav id="navigation"></nav>
          • Class attribute: .
            • li.list
              <li class="list"></li>
          • Tag attribute: []
            • a[target=”_blank” title=”asdf”]
              <a href="" target="_blank" title="asdf"></a>
        • Value: {}
          • li>a>{table}
            <li><a href="">table</a></li>
        • Numbering: $
          • ul.li.item$*5
            <ul class="li item1"></ul>
            <ul class="li item2"></ul>
            <ul class="li item3"></ul>
            <ul class="li item4"></ul>
            <ul class="li item5"></ul>
    • script: script를 입력 후 단축키(Shift + Ctrl + B로 바로 실행 결과 확인. 실행 환경은 따로 설치해야 함.

[Python] pip 사용 시 CERTIFICATE_VERIFY_FAILED 에러

Proxy를 쓴다던가 해서 인증서 오류 등으로 CERTIFICATE_VERIFY_FAILED 에러가 났을 때-중간에서 내용물을 MITM등으로 본다던가 하려고 하는 거겠지…-, 아래처럼 –trusted-host 옵션을 사용한다.

pip install pycurl –proxy PROXY_ADDRESS:PORT –trusted-host pypi.python.org

pip install selenium --proxy IP:PORT --trusted-host pypi.org --trusted-host files.pythonhosted.org

이걸 아예 계속 쓰려면 Windows 기준으로는 $HOME/pip/pip.ini 파일을 만든 후 다음과 같이 써준다.

[global]
proxy = http://12.26.226.2:8080
trusted-host = pypi.python.org
 pypi.org
 files.pythonhosted.org

[Linux] 화면 캡처 프로그램 scrot

3초 뒤에 활성화된 윈도우를 캡쳐하는 방법.

$ scrot -d 3 -u ~/Pictures/filename.png

Raspbian에는 기본으로 설치되어 있으므로, 별도 설치가 필요없다.

참고: http://javacan.tistory.com/entry/raspberry-capture-program-scrot