본문 바로가기

전체 글

국민여가캠핑장 예약 및 정보 금산국민여가오토캠핑장 예약오픈일정 : 매월 10일 오전 10:00 예약사이트 : https://www.xn--jj0bv76ax6ehwhz2i.com/sub1/sub104 정읍시내장산국민여가캠핑장 예약오픈일정 : 매월 25일 20:00 예약사이트 : https://www.jeongeup.go.kr/reserve/facilitie/list.jeongeup?menuCd=DOM_000001207001001000&contentsSid=3450&cpath=%2Freserve 더보기
node에서 서버 자신의 아이피 알아내기 1. ip 모듈 설치 - npm i ip 2. 사용 var ip = require('ip'); var address = ip.address(); 더보기
node.js 에서 암호화 하기 // 함수를 이용한 암호화 const crypto = require('crypto'); function ENCRYPT(arg) { //암호화하여 리턴 const cipher = crypto.createCipher('aes-256-cbc', '사용할Key'); let result = cipher.update(arg, 'utf8', 'base64'); result += cipher.final('base64'); return result; } function DECRYPT(arg) { //복호화하여 리턴 const decipher = crypto.createDecipher('aes-256-cbc', '사용할Key'); let result = decipher.update(arg, 'base64', 'utf8').. 더보기
cordova 에서 BLE 통신하기 1. plugin 설치 (https://github.com/don/cordova-plugin-ble-central) cordova plugin add cordova-plugin-ble-central 2. bluetooth connect let infoLE; function BtConnect(){ ble.connect( 블루투스ID, function(res){ //연결처리 //쓰기, 읽기를 위해서 4번째 배열의 값(service, charcteristic)을 저장해야함. infoLE = res.charcteristics[4]; }, function(){ //연결 실패 처리 } ); } 3. bluetooth write ble.write( 블루투스ID, infoLE.service, infoLE.charact.. 더보기
javascript 우클릭 방지 document.addEventListener("contextmenu", function (event) { //우클릭 방지 event.preventDefault(); }); HTML 삽입 미리보기할 수 없는 소스 더보기
자바스크립트 마우스 호버시에 텍스트 출력 html 마우스를 올려보세요 css /* hoverText */ .hovertext { position: relative; border-bottom: 1px dotted black; } .hovertext:before { content: attr(data-hover); visibility: hidden; opacity: 0; width: max-content; background-color: black; color: #fff; text-align: center; border-radius: 5px; padding: 5px 5px; transition: opacity 1s ease-in-out; position: absolute; z-index: 1; left: 0; top: 110%; } .hovertex.. 더보기
천일문 기본 원문 및 해석 ( 랜덤 ) 1. 번호를 입력후 선택버튼을 누르면 해당 번호의 내용이 나타납니다. 2. 랜덤버튼을 클릭하면 영문이 나타납니다. 3. 해석버튼을 클릭하면 해석이 나타납니다. HTML 삽입 미리보기할 수 없는 소스 더보기
node 서버 exe파일로 배포 1. pkg 설치 npm install --save-dev pkg 2. package.json 추가 "scripts": { "build": "pkg ." }, "bin": "app.js", "pkg": { "assets": [ "public/**/*", "views/**/*" ], "targets": [ "node14-win-x64" ] }, 3. exe 파일 생성 npm run build 더보기