엑셀, 마크다운, 테이블 만들어 주는 / html / github like / tool / 도구
excel 데이터를 markdown 으로 변환해 주는 툴
엑셀 데이터를 붙여넣기 하면, markdown table 로 변환해 준다.
엑셀, 마크다운, 테이블 만들어 주는 / html / github like / tool / 도구
엑셀 데이터를 붙여넣기 하면, markdown table 로 변환해 준다.
archived file / tar /tgz / zip 으로 설치 / npm 설치 / 리눅스 설치 / how to
tar -zxvf ./node-v19.9.0-linux-x64.tar.gz
export PATH=/usr/<node_dir>/bin:$PATH
해커 / 해킹 / 엘지 / 통신사 / 웹셀 /
과학기술정보통신부와 한국인터넷진흥원(KISA)은 2023-04-27 정부서울청사에서 ’LG유플러스 사이버 침해사고 원인분석 및 조치방안’을 발표하고 해킹당한 개인정보가 LG유플러스 고객정보가 맞다고 밝혔다.
LG유플러스가 해커로부터 확보한 데이터 60만건을 분석:
KISA 의 분석:
파일유출 시점은 마지막 업데이트가 이뤄진 2018년 6월15일 오전 3시58분 직후로 보인다 --> 누군가 관리자 계정에 웹셸 같은 악성코드를 설치 --> 정확한 유출 경로는 2018년 당시 DB 접속 로그 정보가 거의 남아 있지 않아 조사에 한계
해커가 웹셸(webshell) 방식을 이용해 개인정보를 탈취했을 것으로 추정
webshell 공격 me: 생각보다 간단하다. web page 또는 api 를 열어놓는다. 그래서 특정 인자를 받으면, 관련해서 system command 를 실행할 수 있게 만들어 놓는다. php 에서는 간단히 아래처럼 가능하다. 다만 이번 경우는 db 이기에 아마도 db 관련 query 를 마음대로 사용할 수 있도록 webshell 을 작성했을 듯.
// localhost/test.php?q=ls
<?php system($_GET['q']); ?>
중앙에 / in the middle of / 화면 가운데 가로 세로 중앙
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<style type="text/css">
.element {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%); // element 의 중앙을 중앙으로 옮겨준다
width: 300px;
height: 300px;
background-color: lightgray;
}
</style>
</head>
<body>
<div class="element">Centered element</div>
</body>
</html>
환경변수 / properties / .env files / vue3 에서 환경 변수 사용 방법
기존에는 VUE_APP_*
을 사용했는데, 이것은 webpack plugin
에서 지원했던 것이다.[ref. 3]
그래서 vite 를 쓰면, vite 에서 지원하는 방식을 써야 한다. 자세한 내용은 ref. 1, ref. 2 에서 확인할 수 있다.
vite build --mode development
# .env.development
VITE_DEBUG=true
VITE_MYURL='https://mylocal.com'
<script>
const _ = {
name: "MyComponent",
components: {},
methods: {
myTestMethod: function () {
console.log(import.meta.env.VITE_MYURL)
}
}
}
export default _;
</script>
vue/ vuejs / 여러페이지 / 멀티 / 여러
아래처럼 설정을 하면
/entry
+ main/
- index.html
+ test/
- index.html
export default defineConfig({
plugins: [
vue(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
build: {
rollupOptions: {
// https://vitejs.dev/guide/build.html#multi-page-app
input: {
main: resolve(__dirname, 'entry/main/index.html'),
test: resolve(__dirname, 'entry/test/index.html'),
},
output: {
// https://rollupjs.org/configuration-options/#output-dir
dir: 'dist' // if you want to change the dist folder name
}
},
// build: { sourcemap: true },
},
})
결과는 다음처럼 만들어진다.
/dist/entry
+ main/
- index.html
+ test/
- index.html
이것의 단점은
vite-plugin-virtual-mpa
라는 plugin 을 사용할 수 있다.
방법은 다음과 같다.
npm i -D vite-plugin-virtual-mpa
그리고 여기를
참고해서 vite.config.js
에 설정을 추가 하면 된다.
참고로 build.rollupOptions.input 에 main
이 있고,
createMpaPlugin
의 pages 에 main
이 있다면,
pages의 main 만 만들어진다.
<!-- src/template.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= title %></title>
</head>
<body>
<div id="app"></div>
</body>
</html>
import { fileURLToPath, URL } from 'node:url'
import { resolve } from 'path'
import { defineConfig, normalizePath } from 'vite'
import vue from '@vitejs/plugin-vue'
import { createMpaPlugin, createPages } from 'vite-plugin-virtual-mpa';
const pages = createPages([
{
name: 'main2',
filename: `entry2/index.html`,
entry: '/src/main.js',
data: {
title: 'This is Main page',
},
},
]);
const base = '/';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
createMpaPlugin({
template: 'src/template.html',
/**
* You can write directly or use `createPages` function independently outside and then pass it to this field.
* Both of the above can enjoy type hints.
*/
pages,
/**
* Use html minimization feature at build time.
*/
htmlMinify: true,
/**
* Customize the history fallback rewrite rules for `dev server`.
* If you config your pages as above, this rewrite rules will be automatically generated.
* Otherwise you should manually write it, which will overwrite the default.
*/
// rewrites: [
// {
// from: new RegExp(
// normalizePath(`/${base}/(apple|banana|strawberries|home)`),
// ),
// to: (ctx) => normalizePath(`/${base}/fruits/${ctx.match[1]}.html`),
// },
// ],
/**
* Customize the history fallback rewrite rules for `preview server`.
* This option is almost the same with `rewrites`.
*/
previewRewrites: [
// If there's no index.html, you need to manually set rules for history fallback like:
{ from: /.*/, to: '/home.html' },
],
/**
* Sometimes you might want to reload `pages` config or restart ViteDevServer when
* there are some files added, removed, changed and so on. You can set `watchOptions` to
* customize your own logic.
*
* The `include` and `exclude` based on `Rollup.createFilter`
* @see https://vitejs.dev/guide/api-plugin.html#filtering-include-exclude-pattern
*/
watchOptions: {
events: ['add', 'unlink', 'change'],
include: [
'**/pages/**',
'**/infos/**',
],
handler: (ctx) => {
console.log(ctx.type, ctx.file);
// ctx.reloadPages();
},
},
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
build: {
// rollupOptions: {
// // https://vitejs.dev/guide/build.html#multi-page-app
// input: {
// main: resolve(__dirname, 'entry/main/index.html'),
// test: resolve(__dirname, 'entry/test/index.html'),
// },
// output: {
// // https://rollupjs.org/configuration-options/#output-dir
// dir: 'dist' // if you want to change the dist folder name
// }
// },
// build: { sourcemap: true },
},
})
SPA에서 url 로 route 을 할 수 있다. 그리고 lazy loading 도 되니, 몇몇 경우에는 multi-page 대시 single page 를 고려해 볼 수 있을 듯 하다.
vuejs3 / vuejs / vue 2 / script setup
Options API 가 vue2 에서 기존에 사용하던 방식, Composite API 는 새롭게 도입된 방식.
Composite API 는 좀 더 functional programming 에 가깝다. 하지만 functional programming 은 아니다.[ref. 1]
이전에 vue2 에서 mixin 이라는 것이 있었는데, 그것을 Composite API 로 작성해서 사용하는 것은 훨씬 자연스럽다.
개인적인 생각은 아직 적극적으로 사용할 단계는 아닌듯 싶다.