Skip to content

Instantly share code, notes, and snippets.

View supernovel's full-sized avatar

supernovel

  • Lucentblock
  • South Korea
View GitHub Profile
@supernovel
supernovel / addressRegExp.js
Last active March 27, 2019 06:00
주소 구성
export const Road = /^(.+\s*.+(로|로?\s?(\d+번)?길)\s+([\d-]+)).*$/;
export const RegString = {
DS: '([^\\s\\d]+(도|시))',
S: '([^\\s\\d]+(시))',
SG: '([^\\s\\d]+(시|구))',
SGG: '([^\\s\\d]+(시|군|구))',
GG: '([^\\s\\d]+(군|구))',
EMD: '([^\\s\\d]+(읍|면|\\d?동|동?\\d?가))',
LI: '([^\\s\\d]+(리)(\\(.*\\))?)',
@supernovel
supernovel / vue-drawer.vue
Last active August 27, 2021 04:08
vue-drawer.vue
<template lang="pug">
//refer to https://github.com/segmentio/chrome-sidebar/blob/master/src/frame.js
transition(name='drawer' appear)
aside(
:class='drawerContainerClass'
v-show='opened'
v-click-outside='vcoOption'
)
div(:class='drawerWrapperClass')
@supernovel
supernovel / vue-scroller.vue
Created April 2, 2019 11:44
vue-scroller.vue
<template lang="pug">
div(ref='container' :class='$style.container')
div(ref='content' :class='$style.content')
div(:class='$style.listWrapper')
ul(:class='$style.list')
slot(
name='item'
:class='$style.listItem'
@click='clickItem($event, item)'
v-for='item in items'
@supernovel
supernovel / gulpfile.js
Created April 7, 2019 05:14
gulp-typescript-relativePath-example
var gulp = require('gulp'),
path = require('upath'),
ts = require('gulp-typescript'),
tsProject = ts.createProject('tsconfig.json'),
through = require('through2');
gulp.task('default', function () {
return tsProject.src()
.pipe(tsProject())
.pipe(through.obj(function (file, enc, cb) {
@supernovel
supernovel / tableToJson.js
Created April 7, 2019 05:16
Converts html table to json.
var $ = require('cheerio');
module.exports = {
tableToJson : tableToJson
}
function tableToJson(table) {
var colGroup = [], //테이블 데이터의 제목 그룹
tdRowSpans = [], //늘어진 데이터 셀 높이
thRowSpans = [], //늘어진 헤더 셀 높이
@supernovel
supernovel / install.sh
Created April 12, 2019 19:13
wsl에서 oh-my-zsh 설정
#!/bin/sh
# oh-my-zsh setting for wsl
font_name="DejaVuSansMono"
font_dir="$HOME/.local/share/fonts/NerdFonts"
exclude_str=".*Windows.*"
setting_text="
POWERLEVEL9K_MODE=\"nerdfont-complete\"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(time user dir_writable dir vcs status)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
@supernovel
supernovel / install.ps1
Last active April 16, 2019 12:15
윈도우 nerdfont 설치(install nerdfont(DejaVuSansMono) for powershell)
#[CmdletBinding(SupportsShouldProcess)]
#param()
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$fontName='DejaVuSansMono'
$currentDirectory = (Get-Location).Path
# Download fonts
$fontZipName = Join-Path "$currentDirectory" "$fontName.zip"
@supernovel
supernovel / fix_npm_permissions.sh
Last active April 16, 2019 12:46
npm 권한 오류 수정
#!/bin/sh
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile
source ~/.profile
@supernovel
supernovel / TestTool.md
Created April 24, 2019 14:16
Welcome file

Test Tool

  • 웹브라우저와 통신을 위한 http기반 프로토콜.
  • webdriver 프로토콜을 지원하지 않는 경우에는 Selenium 서버(http proxy)를 통해 요청을 가로챈 후 스크립트를 붙이고 결과를 http를 통해 Selenium 서버로 보내는 방식을 사용.

Browser Test Runner

다양한 브라우저에 대한 테스트를 할 수 있도록 도와줌. 테스트 코드는 다양한 프레임 워크를 통해 작성 가능.

@supernovel
supernovel / git-branch-prune.ps1
Created August 9, 2019 01:48
링크가 없는 브런치 정리
git remote update origin --prune
git branch -vv | Select-String -Pattern ": gone]" | % { $_.toString().Trim().Split(" ")[0]} | % {git branch -d $_}