Linux/Ubuntu2017. 1. 18. 18:45

읭? 오늘 오랫만에 라즈베리 업데이트 하는데 먼가 멈춰있길래 봤더니

루트인증서 업데이트 인 듯?


음.. 빠진건 왜 빠졌을까? WoSign 계열 파동의 여파일려나?


  Update Mozilla certificate authority bundle to version 2.9.

    The following certificate authorities were added (+):

    + "Certplus Root CA G1"

    + "Certplus Root CA G2"

    + "Certum Trusted Network CA 2"

    + "Hellenic Academic and Research Institutions ECC RootCA 2015"

    + "Hellenic Academic and Research Institutions RootCA 2015"

    + "ISRG Root X1"

    + "OpenTrust Root CA G1"

    + "OpenTrust Root CA G2"

    + "OpenTrust Root CA G3"

    + "SZAFIR ROOT CA2"

    The following certificate authorities were removed (-):

    - "CA Disig"

    - "NetLock Business (Class B) Root"

    - "NetLock Express (Class C) Root"

    - "NetLock Notary (Class A) Root"

    - "NetLock Qualified (Class QA) Root"

    - "Sonera Class 1 Root CA"

    - "Staat der Nederlanden Root CA"

    - "Verisign Class 1 Public Primary Certification Authority - G2"

    - "Verisign Class 3 Public Primary Certification Authority"

    - "Verisign Class 3 Public Primary Certification Authority - G2"


 -- Michael Shuler <michael@pbandjelly.org>  Fri, 18 Nov 2016 09:09:47 -0600 


Posted by 구차니
개소리 왈왈/블로그2017. 1. 18. 09:20

페이스 북은 남들은 편하다는데..

초반의 UI 라던가 구성 그리고 강요되는 정보가 많아서

가입만 하고 쓰질 않고 있었는데


거부하는 순간 자신만의 세계에서는 없는일이 되는 필터링

그로인해 특정그룹에서의 문제점을 더더욱 악화시키고 가속화 시키는게 바로

페이스 북 시스템적인 문제가 아닐까 라는 내용.


[링크 : https://1boon.kakao.com/slownews/61044]

Posted by 구차니
개소리 왈왈/블로그2017. 1. 17. 15:54

엌ㅋㅋ

2016년 660개 글 작성 ㅋㅋㅋㅋㅋ

근데 댓글 93개 뿐인데 상위 5%라니.. 티스토리 전체적으로 댓글이 잘 안달리나 보구나..



방문해 주신 40만 7천 7백 14분 에게 감사드립니다!!


[링크 : http://www.tistory.com/thankyou/2016/tistory/533165]



+

비밀 블로그(전부 비공개)를 하나 하는데

하루 하나는 쓰는게 공개된게 없어서 인지 결산자체가 안된다. ㄷㄷ

Posted by 구차니
embeded/raspberry pi2017. 1. 17. 10:08

4k 55인치가 50만원 정도 하길래 문득 욕심이 나서

가능한가 찾아 보니.. 15p만 되면 어우...


그래도 odorid는 1920x1200까지만 된다고 하는거 보단 낫긴한데..

[링크 : http://forum.odroid.com/viewtopic.php?f=95&t=12026]


hdmi_group=2

hdmi_mode=87

hdmi_ignore_edid=0xa5000080

hdmi_cvt 3840 2160 15 

[링크 : http://raspberrypi.stackexchange.com/questions/44089/can-raspberry-pi-3-do-4k-video]


목록상에는 안나오는 87번 모드?

[링크 : http://elinux.org/RPiconfig]

Posted by 구차니
Programming/php2017. 1. 16. 18:23

문득 mediawiki 어디가 이렇게 버벅대나 한번 보려는데 검색을 해보니 xdebug라는 녀석이 있네

$ sudo apt-cache search xdebug

php5-xdebug - Xdebug Module for PHP 5 

[링크 : http://stackoverflow.com/questions/21133/simplest-way-to-profile-a-php-script]


우분투에서 설치하고(라즈베리) phpinfo로 보니 일단 비활성화

xdebug.profiler_aggregate Off Off

xdebug.profiler_append Off Off

xdebug.profiler_enable Off Off

xdebug.profiler_enable_trigger Off Off

xdebug.profiler_output_dir /tmp /tmp

xdebug.profiler_output_name cachegrind.out.%p cachegrind.out.%p


kcachegrind를 깔기에는 KDE다 끌려올 기세라..

$ apt-cache search KCachegrind

kcachegrind - visualisation tool for the Valgrind profiler

kcachegrind-converters - format converters for KCachegrind profiler visualisation tool 


$ sudo vi /etc/php5/apache2/php.ini

[xdebug]

xdebug.profiler_enable = 1

xdebug.profiler_output_name = xdebug.out.%t

xdebug.profiler_output_dir = /tmp

xdebug.profiler_enable_trigger = 1

[링크 : https://www.sitepoint.com/debugging-and-profiling-php-with-xdebug/]


[링크 : https://code.google.com/archive/p/webgrind/]

[링크 : https://github.com/jokkedk/webgrind]


webgrind를 깔고 하는데 라즈베리 성능의 문제인지 한 5분은 거의 먹통...

아무튼 total inclusive cost 로 정렬을 해보니

라즈베리에서 mysql이 꽤나 느리긴 한지, database-query에서 꽤나 많은 시간을 잡아 먹는다.


+

2017.01.18

어라..? var_dump()를 했는데.. <pre> 태그에 xdebug 관련 내용이 추가되면서

밋밋하던 녀석이 갑자기 컬러풀해졌다?

<pre><pre class='xdebug-var-dump' dir='ltr'>
<b>array</b> <i>(size=4)</i>
0 <font color='#888a85'>=&gt;</font>
<b>array</b> <i>(size=1)</i>
'Tables_in_archlog' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'article'</font> <i>(length=7)</i>
1 <font color='#888a85'>=&gt;</font>
<b>array</b> <i>(size=1)</i>
'Tables_in_archlog' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'blobs'</font> <i>(length=5)</i>
2 <font color='#888a85'>=&gt;</font>
<b>array</b> <i>(size=1)</i>
'Tables_in_archlog' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'reply'</font> <i>(length=5)</i>
3 <font color='#888a85'>=&gt;</font>
<b>array</b> <i>(size=1)</i>
'Tables_in_archlog' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'user'</font> <i>(length=4)</i>
</pre></pre>


+

2017.01.19

xdebug가 var_dump를 교체해버린다고 한다.

[링크 : http://stackoverflow.com/questions/15666916/weird-var-dump-behavior]

'Programming > php' 카테고리의 다른 글

php global  (0) 2017.01.23
html+php login form  (0) 2017.01.18
php 암호 해싱  (0) 2017.01.16
php sprintf  (0) 2017.01.15
php array to table  (0) 2017.01.14
Posted by 구차니
프로그램 사용/wiki2017. 1. 16. 13:17

깨끗한 모습은 아래와 같고..

page_id

Uniquely identifying primary key. This value is preserved across edits, renames, and, as of MediaWiki 1.27, deletions, via an analogous field in the archive table (introduced in MediaWiki 1.11). For example, for this page, page_id = 10501. [1][2] This field can be accessed by WikiPage::getId(), Title::getArticleID(), etc.


page_latest

This is a foreign key to rev_id for the current revision. It may be 0 during page creation. It needs to link to a revision with a valid revision.rev_page, or there will be the "The revision #0 of the page named 'Foo' does not exist" error when one tries to view the page. Can be obtained via WikiPage::getLatest(). 

[링크 : https://www.mediawiki.org/wiki/Manual:Page_table]


rev_id

This field holds the primary key for each revision. page_latest is a foreign key to this field.


rev_page

This field holds a reference to the page to which this revision pertains. The number in this field is equal to the page_id field of said page. This should never be invalid; if it is, that revision won't show up in the page history. If page.page_latest links to a revision with an invalid rev_page, this will cause the "The revision #0 of the page named 'Foo' does not exist" error.


rev_text_id

This is a foreign key to old_id in the text table. (The text table is where the actual bulk text is stored.) It's possible for multiple revisions to use the same text—for instance, revisions where only metadata is altered, or where a rollback is done to a previous version. 

[링크 : https://www.mediawiki.org/wiki/Manual:Revision_table]


The text table holds the wikitext of individual page revisions. If using Postgres or Oracle, this table is named pagecontent. 

[링크 : https://www.mediawiki.org/wiki/Manual:Text_table]


낙서를 좀 하면 아래와 같아지나?

page가 주제어에 따른 고유 id로 revision으로 page의 revision을 관리

revision에서는 text와 연결되어 revision 별로 관리 하는데..

그렇다면 page별 리비전은 

revision에서 rev_page값을 page의 page_id를 이용하여 검색하면 될거 같긴하네

내용 자체는 revision의 rev_text_id를 통해 text.old_id를 하면 될 거 같고


[링크 : https://www.mediawiki.org/wiki/Manual:Database_layout]

    [링크 : https://upload.wikimedia.org/wikipedia/commons/9/94/MediaWiki_1.28.0_database_schema.svg]



+

운영중인 위키에서 내용 본건데..

page 의 page_id와 page_latest

revision 의 rev_page와 rev_text_id

text 의 old_id


'프로그램 사용 > wiki' 카테고리의 다른 글

mediawiki upgrade 1.19(LTS) to ???  (0) 2018.04.20
mediawiki sql debug dump  (0) 2017.06.16
mediawiki 다국어 확장 및 번역 확장  (0) 2017.01.10
mediawiki 1.28.0과 Xcache  (0) 2017.01.09
mediawiki extension - deletehistory  (0) 2015.11.04
Posted by 구차니
Programming/php2017. 1. 16. 11:19

brcypt니 mcrypt니 왜 phpmyadmin에서 안뜨나 했더니

얘는 생각을 해보니 mysql에서 제공하는 암화화 방식...

그냥 php 에서 코드 짜서 암호화 하는거라 당연히.. phpmyadmin에서 뜰리가...

ㅠㅠ


[링크 : http://php.net/manual/kr/function.password-hash.php]

'Programming > php' 카테고리의 다른 글

html+php login form  (0) 2017.01.18
xdebug - php debug / profiler  (0) 2017.01.16
php sprintf  (0) 2017.01.15
php array to table  (0) 2017.01.14
php <?=$var>  (0) 2017.01.09
Posted by 구차니

aes랑 des는 phpmyadmin에서 안되서 좀더 찾아 봐야 할 듯..


입력 1234

password() *A4B6157319038724E3560894F7F932C8886EBFCF

encrypt() 36QYTDVIT3tfU

md5() 81dc9bdb52d04dc20036dbd8313ed055

sha1() 7110eda4d09e062aa5e4a390b0a572ac0d2c0220


별다른 옵션 안주고 실행한것임. 길이를 보면 대충 보일려나?


그나저나.. brcypt 이런건 함수가 안보이네..

+

bcrypt mcrypt는 php쪽 이니까 있을리가!?


5.7 부터 은근 deprecate 된 함수들이 꽤 있네..

[링크 : http://dev.mysql.com/doc/refman/5.7/en/encryption-functions.html]

'프로그램 사용 > mysql & mariaDB' 카테고리의 다른 글

mysql event (schedule)  (0) 2017.02.05
mysql 테이블 내 일정 문자열 치환하기  (0) 2017.01.26
mysql prepare + execute 와 query 차이점  (0) 2017.01.15
mysql mariadb 호환성  (0) 2017.01.12
mysql 트랜잭션  (0) 2017.01.12
Posted by 구차니
Programming/php2017. 1. 15. 23:09

음.. 보다 보니 예전에 찾았던

posix sprintf의 %1$s가 떠오르네


[링크 : http://php.net/manual/en/function.sprintf.php]

2014/12/09 - [Programming/C / Win32 / MFC] - printf POSIX 확장 %1$d


'Programming > php' 카테고리의 다른 글

xdebug - php debug / profiler  (0) 2017.01.16
php 암호 해싱  (0) 2017.01.16
php array to table  (0) 2017.01.14
php <?=$var>  (0) 2017.01.09
PHP 최적화 관련  (0) 2017.01.09
Posted by 구차니

php에서 PDO를 통해

prepare / execute / fetch를 통해 수행하는 것과

query / fetch를 하는게 있길래 찾아보니..


얘는 엄밀하게 mysql의 지원기능이라고 해야 하려나?

mysql> SET @s = 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';

mysql> PREPARE stmt2 FROM @s;

mysql> SET @a = 6;

mysql> SET @b = 8;

mysql> EXECUTE stmt2 USING @a, @b;

+------------+

| hypotenuse |

+------------+

|         10 |

+------------+

mysql> DEALLOCATE PREPARE stmt2; 

[링크 : https://dev.mysql.com/doc/refman/5.7/en/sql-syntax-prepared-statements.html]


prepare는 mysql 내부에서 치환을 통해 어떠한 수행을 할 수 있는 일종의 매크로 같은 개념으로

확장해서 사용할 수 있도록 하는 건데..


성능상의 차이가 없다면.. php에서 query문을 직접 변수 치환해서 하는게 편할수도 있을테니

어느게 좋고 어느게 나쁘다 라고 하긴 애매 할 듯.

관리적인 측면에서는 쿼리문을 쫘악 정리하고 변수 치환만 해서 쓰도록

php에서 변수 대입을 하던 mysql 에서 prepare로 하던 똑같으니까?


[링크 : http://www.codeigniter-kr.org/bbs/view/qna?idx=9891]

[링크 : http://stackoverflow.com/questions/4700623/pdos-query-vs-execute]


'프로그램 사용 > mysql & mariaDB' 카테고리의 다른 글

mysql 테이블 내 일정 문자열 치환하기  (0) 2017.01.26
mysql 암호화 방법들...?  (0) 2017.01.16
mysql mariadb 호환성  (0) 2017.01.12
mysql 트랜잭션  (0) 2017.01.12
mysql blob - binary large object  (0) 2017.01.12
Posted by 구차니