프로그램/script 70

KR ip Zone

가끔 우리나라에서 접속하는 ip 인지를 체크해야 할때가 있습니다. 클라우드 api가 아래와 같이 제공 됩니다. jQuery.ajax({ url: 'https://get.geojs.io/v1/ip/geo.js', success: function(data){ console.log(JSON.parse(data.substring(6, data.length - 2)).country_code) } }) 아래는 KRNIC 에서 공개하는 Korea IP Zone 입니다. https://xn--3e0bx5euxnjje69i70af08bea817g.xn--3e0b707e/jsp/statboard/IPAS/ovrse/natal/IPaddrBandCurrent.jsp?nationCode1=KR 한국인터넷정보센터(KRNIC) ..

프로그램/script 2024.03.25

javascript jQuery popup, lightbox - magnific popup

매우 좋은 팝업 플러그인 http://dimsemenov.com/plugins/magnific-popup/ Magnific Popup is a responsive lightbox & dialog script with focus on performance and providing best experience for user with any device (for jQuery or Zepto.js).Documentation · GitHub · WordPress plugin · Build tool · How it was made /**youtube video popup**/ $('.modal-video').magnificPopup({ type: 'iframe' }); $(document).ready(functi..

프로그램/script 2018.04.17

펌: 2015/10/28/ES6-compare-ES5/ 기존에 익숙하게 사용하던 ES5 Javascript 와 ES6 비교

가끔 require 나 import 가 언제부터 쓰이기 시작했는지가 궁금한 사람이라면....아래 블로그를 참조해보세요... 출처 : http://lainfox.github.io/dev/2015/10/28/ES6-compare-ES5/ 일단 허락없이 아래 카피함...기존에 익숙하게 사용하던 ES5 Javascript 와 ES6 비교Oct 28, 2015 1 minute read이 문서는 지속적으로 업데이트 될 예정입니다.2015년 6월 ES6 최종 스팩이 승인되었습니다. 크롬과 파이어폭스에서는 쉽게 ES6 을 사용할 수 있지만 다른 브라우저는 babel, traceur, es6-shim등을 이용해야 합니다. (추후 업데이트)변수 선언 var vs letES6 에서 사용하는 변수 선언. ES5 에서 사용하던..

프로그램/script 2018.02.05

javascript : Array.prototype.slice and splice

Array.prototype.slice and splice 자주 안써서 햇갈릴수 있는 함수.... ^^ slice : The slice() method returns a shallow copy of a portion of an array into a new array object selected from begin to end (end not included). The original array will not be modified. splice : The splice() method changes the contents of an array by removing existing elements and/or adding new elements original array was modified...----..

프로그램/script 2018.01.25

mobile app개발시 cors enable , same origin policy 극복하기

mobile api를 개발하거나, json api proxy가 필요한경우 고민하지 말고 아래의 솔루션을 이용하자. $ sudo npm install -g cors-proxy-serverPassword:/usr/local/bin/cors-proxy-server -> /usr/local/lib/node_modules/cors-proxy-server/index.js+ cors-proxy-server@1.0.2added 5 packages in 2.018s $ $ cors-proxy-server [Mon Dec 04 2017 10:56:56 GMT+0900 (KST)] - CORS Proxy Server started on 0.0.0.0:9090 이제 아래와 같이 접속 어디든 접속 가능하다. http://loc..

프로그램/script 2017.12.04