This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "categories": [ | |
| { | |
| "name": "Movies", | |
| "videos": [ | |
| { | |
| "description": "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
| "sources": [ | |
| "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const exec = require("child_process").exec; | |
| // 임시버전 | |
| const selectPidIExplore = () => { | |
| return new Promise(() => { | |
| exec(`tasklist | findstr "iexplore.exe"`,(err,stdout,stderr) => { | |
| const pids = stdout.split(/\n/).map((row) => { | |
| return row.trim().split(/\s+/)[1]; | |
| }); | |
| pids.pop(); // stdout 스플릿 상, 마지막 빈줄이 들어감. 제외처리 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* .tts 라고도 하고, .sr-only 라고도 하고, .blind 라고도 하는 웹접근성 관련 TTS 프로그램 인식 CSS 코드 */ | |
| .blind{ | |
| position: absolute; | |
| border: 0; | |
| clip: rect(0 0 0 0); | |
| clip-path: inset(50%); | |
| width: 1px; | |
| height: 1px; | |
| margin: -1px; | |
| overflow: hidden; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <% | |
| const 변수1 = "변수값"; // 그냥 선언하기 | |
| // {string} 상수2 : 상수설명 | |
| const 상수2 = locals.상수2; // include options 로 땡겨올때 필수값 | |
| // {"변수옵션값1"|"변수옵션값2"} [변수3 = "변수옵션값1"] : 변수설명 | |
| let 변수3 = locals.변수3 ? locals.변수3 : "변수옵션값1"; // include options 로 땡겨올때 옵션값 | |
| const { 상수4 , 상수5 = "변수값" } = locals; // 객체분해할당 으로 include options 땡겨옴(이게 젤 많이 씀, 간단하니까) | |
| %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 포트번호 기준해서, pid값 구하는거 (netstat 이용) | |
| import { exec } from "child_process"; // 작으니까 exec | |
| const splitStat = (stat) => stat.trim().split(/\s+/); // 띄어쓰기를 기준으로 스플릿 | |
| const findPidFromPort = (port_) => { | |
| return new Promise((resolve,reject) => { | |
| exec(`netstat -ano`,(err,stdout,stderr) => { | |
| if(err) reject(err); // 에러가 존재 한다면 리턴해준다. | |
| if(stderr) reject(stderr); // 표준에러가 존재 한다면 리턴해준다. | |
| const _portReg = new RegExp(`:${port_}$`); // 포트번호가 딱 떨어져야함 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // node , windows 에서 spawn 사용 기초 | |
| // 스토리북 연동 중, global storybook이 없는 케이스 (로컬에서만 돌려야 하는경우) | |
| // gulp 에서 즉시 실행이 불가함. (global에 없음 == storybook 다이렉트 실행 불가.) | |
| import { task } from "gulp"; // gulp4 | |
| import { spawn } from "child_process"; | |
| // 부모프로세서에서 로그를 함께 볼때 (자식 -> 부모 로 log 전파됨) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 참고 : https://playwright.dev/docs/next/api/class-browsertype#browser-type-launch-server | |
| // v1.29.0 기준 정상동작 확인 됨. | |
| import { chromium , device } from "playwright"; | |
| import type { Browser , Page } from "playwright"; | |
| // 기본형태 (간단버전?) | |
| const createBrowserBasic = async () => { | |
| let option = { // https://playwright.dev/docs/api/class-browsertype#browser-type-launch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 참고 : https://velog.io/@dev2820/nodejs%EC%9D%98-%EC%9E%90%EC%8B%9D%ED%94%84%EB%A1%9C%EC%84%B8%EC%8A%A4 | |
| const { spawn } = require("child_process"); | |
| const makeChildProcess = () => { | |
| const child = spawn("커멘드",{ | |
| detached:true, | |
| stdio:"ignore" | |
| }); | |
| console.log( child.pid ); // (1) 나중에 닫을려고 일단 꺼내보기 | |
| child.unref(); // 자식프로세스와 연결끊기(부모프로세스 종료) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var webdriver = require('selenium-webdriver'), By = webdriver.By, until = webdriver.until; | |
| var driver = new webdriver.Builder().forBrowser('chrome').build(); |
NewerOlder