Programming/node.js2019. 4. 5. 15:08

머.. 별건 아니고(?)

path 모듈에서 fs 모듈로 변경되어서 에러난 놈을 열어보고 모듈을 바꾸어주면 일단 ok 인듯?

(만약 그거 하나만 문제라면..)

 

[링크 : https://github.com/horaci/node-mitm-proxy]

'Programming > node.js' 카테고리의 다른 글

node.js mkdir -p 옵션 사용하기  (0) 2019.04.10
http-mitm-proxy 예제  (0) 2019.04.08
node.js mitm proxy (for https)  (0) 2019.04.02
proxy http node.js  (0) 2019.04.01
TypeError: Converting circular structure to JSON  (0) 2019.03.27
Posted by 구차니

요즘에 점점 전화가 안터지는 곳이 많아지고 있어서 도저히 못참겠다!!! 외치면서 3G에서 LTE로 갈아타기 단행!

114로 전화하니 freeT KT로 전화되서 번호이동이니 freeT SK로 전화하라고 해서 물어보니

3개월 가입유지외에는 별거 없대서 일단 갈아타기 ㄱㄱ

 

원래 가고 싶었던건 아래 요금제 인데 신규 가입에 대한 프로모션 요금제라 사용중인 사람은 못 쓴다고.. ㅠㅠ

그래서 과감하게(?) LTE 요금제로 갈아타기! 일단은 freeT KT 망에서 freeT SK 망으로 번호이동!

 

현재 1500원 요금제(VAT 별도, 3G) 에서 한달 싸면 7천 많으면 1.3만 까지 나오는지라(100분 통화하면 1.3만까지 나옴)

일단 만원 근처의 것으로 검색했는데 60분 짜리 해서 40분 통화 더하면 기본료 8000 + 통화료 6000 나오길래 포기하고

소심하게 100분짜리로 일단 ㄱㄱ

 

그나저나 가입비랑 USIM 가격이 문제라니 개꿀이다! (막상 신청하려니까 아.. 전화로 안물어봤네 후회했지만..)

 

이것저것 입력하고 나니 띠링 VAT 포함 10450원에 100분 무료통화

(딱 1년지난) 11G/만원 에그 쓰고 있어서 450MB는 계륵이긴 한데 머 슬슬 외주작업 시작하면 통화비 늘어날테니..

 

아무튼 USIM 발송해서 받고 나면 진행된다고 하니 느긋하게 해봐야지 머

(상담사는 늦어도 1주일 안에는 된다고 하는데, 이번주에는 안되는거죠 했더니 빵 터지신듯 -_ㅠ)

'개소리 왈왈 > 모바일 생활' 카테고리의 다른 글

게임 하나 접음  (2) 2019.07.22
일단은 freet SKT로 번호이동!  (0) 2019.04.08
VaR VR 플레이어 한글 자막 문제  (0) 2019.03.09
마이크로 SD 64GB에 만원이라니..  (3) 2019.03.09
VR 헬멧  (0) 2019.03.07
Posted by 구차니
프로그램 사용/squid2019. 4. 4. 15:21

음.. parent로 hier_direct를 돌릴순 있는데

그럼 자기 자신 혼자 사용중에는 자신이 parent가 아닌건가?

4.1 How do I join a cache hierarchy?
To place your cache in a hierarchy, use the cache_host directive in squid.conf to specify the parent and sibling nodes.

For example, the following squid.conf file on childcache.example.com configures its cache to retrieve data from one parent cache and two sibling caches:

        #  squid.conf - On the host: childcache.example.com
        #
        #  Format is: hostname  type  http_port  udp_port
        #
        cache_host parentcache.example.com   parent  3128 3130
        cache_host childcache2.example.com   sibling 3128 3130
        cache_host childcache3.example.com   sibling 3128 3130
The cache_host_domain directive allows you to specify that certain caches siblings or parents for certain domains:

        #  squid.conf - On the host: sv.cache.nlanr.net
        #
        #  Format is: hostname  type  http_port  udp_port
        #

        cache_host electraglide.geog.unsw.edu.au parent 3128 3130
        cache_host cache1.nzgate.net.nz          parent 3128 3130
        cache_host pb.cache.nlanr.net   parent 3128 3130
        cache_host it.cache.nlanr.net   parent 3128 3130
        cache_host sd.cache.nlanr.net   parent 3128 3130
        cache_host uc.cache.nlanr.net   sibling 3128 3130
        cache_host bo.cache.nlanr.net   sibling 3128 3130
        cache_host_domain electraglide.geog.unsw.edu.au .au
        cache_host_domain cache1.nzgate.net.nz   .au .aq .fj .nz
        cache_host_domain pb.cache.nlanr.net     .uk .de .fr .no .se .it
        cache_host_domain it.cache.nlanr.net     .uk .de .fr .no .se .it
        cache_host_domain sd.cache.nlanr.net     .mx .za .mu .zm
The configuration above indicates that the cache will use pb.cache.nlanr.net and it.cache.nlanr.net for domains uk, de, fr, no, se and it, sd.cache.nlanr.net for domains mx, za, mu and zm, and cache1.nzgate.net.nz for domains au, aq, fj, and nz.

[링크 : http://www.comfsm.fm/computing/squid/FAQ-4.html]

[링크 : https://www.christianschenk.org/blog/using-a-parent-proxy-with-squid/]

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

squid hierarchy와 cache  (0) 2019.04.04
squid storeid... 에러  (0) 2019.04.03
squid storeid  (0) 2019.04.03
squid storeurl_rewrite  (0) 2019.04.02
lynx proxy  (0) 2019.03.27
Posted by 구차니

CIC decimation filter

 

[링크 : https://electronics.stackexchange...mems-digital-microphone-codec-and-raspberry-pi-zero-w]

[링크 : https://en.wikipedia.org/wiki/Cascaded_integrator%E2%80%93comb_filter]

[링크 : https://blog.naver.com/jinohpark79/110189214821]

[링크 : https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/an/an455.pdf]

[링크 : http://home.mit.bme.hu/~kollar/papers/cic.pdf]

 

 

'이론 관련 > 전기 전자' 카테고리의 다른 글

역률 개선  (0) 2019.05.09
dc to ac  (0) 2019.05.03
DSD/PDM 그리고 초음파  (0) 2019.04.01
PDM과 DSD  (0) 2019.03.30
pdm - Pulse Width Modulation  (0) 2019.03.29
Posted by 구차니
프로그램 사용/squid2019. 4. 4. 07:49

관련 문서 정리

흐음.. hier_direct를 못하도록 막으면 통신이 안되고 어떻게 할 방법이 없나..

캐시 구조에서 상위로 돌리도록 하고 상위에서 어떻게 처리가 가능할줄 알았는데..

 

[링크 : http://www.squid-cache.org/Doc/config/nonhierarchical_direct/]

[링크 : https://wiki.squid-cache.org/Features/CacheHierarchy]

[링크 : https://wiki.squid-cache.org/SquidFaq/SquidLogs#Hierarchy_Codes]

[링크 : http://www.squid-cache.org/Doc/config/url_rewrite_program/]

[링크 : https://github.com/rchunping/squid-urlrewrite]

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

squid 캐시에 합류하기  (0) 2019.04.04
squid storeid... 에러  (0) 2019.04.03
squid storeid  (0) 2019.04.03
squid storeurl_rewrite  (0) 2019.04.02
lynx proxy  (0) 2019.03.27
Posted by 구차니

기존에는 standard로 썼는데, standard는 문단 정렬 기능이 먹지 않아서 full로 설정해주어야 적용이 된다.

The following distributions (see comparison table) are available:

  • basic - the Basic preset
  • standard - the Standard preset
  • standard-all - the Standard preset together with all other plugins created by CKSource*
  • full - the Full preset
  • full-all - the Full preset together with all other plugins created by CKSource*

[링크 : https://cdn.ckeditor.com/]

 

옵션을 만들어주는 사이트

기본은 아래와 같이 생성해주는데

CKEDITOR.editorConfig = function( config ) {
config.toolbar = [
{ name: 'document', items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
{ name: 'editing', items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] },
{ name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
'/',
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'CopyFormatting', 'RemoveFormat' ] },
{ name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] },
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
{ name: 'insert', items: [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] },
'/',
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] },
{ name: 'about', items: [ 'About' ] }
];
};

 

코드에서 쓰려면 config. 이후를 붙이고 수정하면된다.

<script src="https://cdn.ckeditor.com/4.11.3/full/ckeditor.js"></script>

<script>

CKEDITOR.replace('ckeditor4', {

uploadUrl: '/uploader',

toolbar : [ 
{ name: 'document', items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] }, 
{ name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] }, 
{ name: 'editing', items: [ 'Find', 'Replace', '-', 'SelectAll', '-', 'Scayt' ] }, 
{ name: 'forms', items: [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] }, 
'/', 
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'CopyFormatting', 'RemoveFormat' ] }, 
{ name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ] }, 
{ name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] }, 
{ name: 'insert', items: [ 'Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe' ] }, 
'/', 
{ name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] }, 
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] }, 
{ name: 'tools', items: [ 'Maximize', 'ShowBlocks' ] }, 
{ name: 'about', items: [ 'About' ] } 
]

});

</script>

[링크 : https://ckeditor.com/latest/samples/toolbarconfigurator/index.html#basic]

'프로그램 사용 > ckeditor(웹에디터)' 카테고리의 다른 글

ckeditor 모드별 모양  (0) 2019.03.08
ckeditor file upload with node.js  (0) 2019.03.07
ckeditor / fckeditor?  (0) 2014.07.16
ckeditor 사용하기  (0) 2013.02.22
fckeditor plugin for squirrelMail  (0) 2011.06.14
Posted by 구차니
프로그램 사용/squid2019. 4. 3. 14:50

storeid를 해보려고 ruby 스크립트까지 해보는데 안되서 급 멘붕..

에러를 천천히 보니 일단은 new_format.rb가 실행이 안되는 듯한데

# systemctl status squid 
● squid.service - Squid caching proxy 
   Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled; vendor preset: disabled) 
   Active: failed (Result: exit-code) since 수 2019-04-03 14:40:47 KST; 5ms ago 
  Process: 20020 ExecStop=/usr/sbin/squid -k shutdown -f $SQUID_CONF (code=exited, status=1/FAILURE) 
  Process: 19848 ExecStart=/usr/sbin/squid $SQUID_OPTS -f $SQUID_CONF (code=exited, status=0/SUCCESS) 
  Process: 19842 ExecStartPre=/usr/libexec/squid/cache_swap.sh (code=exited, status=0/SUCCESS) 
 Main PID: 19851 (code=exited, status=1/FAILURE) 

 4월 03 14:40:47 localhost squid[19851]: Squid Parent: (squid-1) process 19990 started 
 4월 03 14:40:47 localhost (squid-1)[19990]: The store_id helpers are crashing too rapidly, need help! 
 4월 03 14:40:47 localhost squid[19851]: Squid Parent: (squid-1) process 19990 exited with status 1 
 4월 03 14:40:47 localhost squid[19851]: Squid Parent: (squid-1) process 19990 will not be restarted due to repeated, frequent failures 
 4월 03 14:40:47 localhost squid[19851]: Exiting due to repeated, frequent failures 
 4월 03 14:40:47 localhost systemd[1]: squid.service: main process exited, code=exited, status=1/FAILURE 
 4월 03 14:40:47 localhost squid[20020]: squid: ERROR: Could not send signal 15 to process 19990: (3) No such process 
 4월 03 14:40:47 localhost systemd[1]: squid.service: control process exited, code=exited status=1 
 4월 03 14:40:47 localhost systemd[1]: Unit squid.service entered failed state. 
 4월 03 14:40:47 localhost systemd[1]: squid.service failed. 

 

퍼미션은 진작에 +x로 줬는데 안되고

If you get this error:

FATAL: The store_id helpers are crashing too rapidly, need help!

check for permssions

[링크 : https://github.com/rudiservo/pfsense_storeid]

 

그냥 해당 스크립트를 실행해보니 에러 발생.. libxml...?

# ruby new_format.rb
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- libxml (LoadError)
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
        from new_format.rb:8:in `'

그래서 검색해서 해당 모듈을 까는데 안깔린다!!!

# gem install -r libxml-ruby 
Fetching: libxml-ruby-3.1.0.gem (100%) 
Building native extensions.  This could take a while... 
ERROR:  Error installing libxml-ruby: 
        ERROR: Failed to build gem native extension. 

    /usr/bin/ruby extconf.rb 
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h 


Gem files will remain installed in /usr/local/share/gems/gems/libxml-ruby-3.1.0 for inspection. 
Results logged to /usr/local/share/gems/gems/libxml-ruby-3.1.0/ext/libxml/gem_make.out 

[링크 : https://github.com/xml4r/libxml-ruby]

 

ruby 모듈 하나 설치하려고 먼가 잔뜩 깔게 하다니..

yum install gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel ruby-devel libxml2 libxml2-devel libxslt libxslt-devel git

[링크 : https://gist.github.com/lovellfelix/8135631]

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

squid 캐시에 합류하기  (0) 2019.04.04
squid hierarchy와 cache  (0) 2019.04.04
squid storeid  (0) 2019.04.03
squid storeurl_rewrite  (0) 2019.04.02
lynx proxy  (0) 2019.03.27
Posted by 구차니
프로그램 사용/nginx2019. 4. 3. 14:15

ckeditor에 파일을 올리는데 localhost에서는 잘만 올라가는 놈인데

회사 서버에만 하면 안되서 리눅스 버전이 문제인가 고민을 했지만..

/uploader:1 Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)

일단은 node.js 쪽 설정은 기본으로도 충분히 잘 올라가는 상황이라 아래 내용은 별 의미없어 보이고

혹시나 리눅스용은 먼가 다른가 해서 했지만 안올라가는건 여전한 상황 -_-

[링크 : https://stackoverflow.com/questions/19917401/error-request-entity-too-large]

[링크 : http://meonggae.blogspot.com/2016/11/http-response-code-413.html]

 

 

검색을 하다보니 갑자기 반짝하는 키워드.. 아...

nginx에서 reverse proxy로 쓰고 있었는데 nginx에서도 body 크기가 제한되는데 이걸 풀어줘야 정상작동 한다.

http {
    client_max_body_size 5M;

}

[링크 : https://github.com/expressjs/body-parser/issues/235]

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

nginx - 413 Request Entity Too Large  (0) 2024.06.13
(angluar/react) router와 nginx  (0) 2019.05.31
nginx 502 bad gateway와 audit  (0) 2019.03.20
nginx rever proxy with virtual host(+ subdomain)  (0) 2019.03.07
nginx load balance  (0) 2019.03.05
Posted by 구차니
프로그램 사용/squid2019. 4. 3. 13:32

store_urlrewrite_progam 을 써보려고 했더니 2.7 only로 되어 있어서..

Feature: Store URL Rewriting?
Goal: Separate out the URL used for storage lookups from the URL used for forwarding. This allows for multiple destination URLs to reference the same backend content and cut back on duplicated content, both for forward proxies (think "google maps") and CDN type reverse proxies.

Status: deprecated. see StoreID

[링크 : https://wiki.squid-cache.org/Features/StoreUrlRewrite]

 

이걸 봐야 할 듯..

[링크 : https://wiki.squid-cache.org/Features/StoreID]

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

squid hierarchy와 cache  (0) 2019.04.04
squid storeid... 에러  (0) 2019.04.03
squid storeurl_rewrite  (0) 2019.04.02
lynx proxy  (0) 2019.03.27
url_rewriter squid  (0) 2019.03.15
Posted by 구차니

자출할때 비싼 자전거 두기 부담스러운데

그래서 자전거를 맡길 공간을 빌려주겠다!라는 컨셉인가 아닌가 헷갈리는 회사

(사이트 가서 보니 창고 임대도 가능한듯)

 

아무튼 로드는 월 19.8만 MTB는 22만

근데 이 정도면... 헬스 + 월간 주차료 보다 비싼거 아냐?

걍 차 끌고 다니는게 나을지도 모르겠는데?

 

[링크 : http://bike-park.co.kr]

 

 

+

근 2년만에 엔도몬도 다시 깔고 아침에 일찍 출근해져서 자전거 탐

어제 점심엔 위로 한정거정 갔는데 오늘은 아래로 한정거장

약하지만 역풍으로 시작해서 그런지 갈떄보다 올때가 빠르네

그나저나 겨우 4.5km 인데 허벅지 아프당 ㅠㅠ

 

+

오가는길에 보니 한진택배 임대 붙여 놨더라..

한진택배 배송창고에서 이런거 맡아주면 싸게 할 거 같은데 아쉽네?

'개소리 왈왈 > 자전거' 카테고리의 다른 글

2019 자전거 대행진 신청!  (2) 2019.04.24
2019 서울 자전거 대행진!  (2) 2019.04.23
하루 늦은 지름 신고(?)  (0) 2019.03.17
바 테잎 감음  (0) 2019.03.15
간만에 자전거 포 갔더니..  (3) 2019.03.10
Posted by 구차니