Skip to content

Instantly share code, notes, and snippets.

View pinedance's full-sized avatar

Junho pinedance

View GitHub Profile
"use strict";
var numeric = (typeof exports === "undefined")?(function numeric() {}):(exports);
if(typeof global !== "undefined") { global.numeric = numeric; }
numeric.version = "1.2.4";
// 1. Utility functions
numeric.bench = function bench (f,interval) {
var t1,t2,n,i;
@pinedance
pinedance / install_vscode_WSL_server_manually.sh
Created September 21, 2020 23:43
VScode를 WSL에서 사용하기 위해서는 WSL에 서버 설치가 필요하다. 설치가 자동화 되어 있지만, certification 문제로 수동으로 설치해야 하는 경우가 있어 올려둔다.
commit_id=58bb7b2331731bf72587010e943852e13e6fd3cf
# Download url is: https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable
curl -sSL "https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable" -o vscode-server-linux-x64.tar.gz --insecure
mkdir -p ~/.vscode-server/bin/${commit_id}
# assume that you upload vscode-server-linux-x64.tar.gz to /tmp dir
tar zxvf ./vscode-server-linux-x64.tar.gz -C ~/.vscode-server/bin/${commit_id} --strip 1
touch ~/.vscode-server/bin/${commit_id}/0
#! /bin/bash
##############################
##윈도우10 우분투 16.04 설치 및 세팅##
##############################
## 설치
# MS store에서 ubuntu 16.04 설치
# 설치후 계정 이름과 비번 설정 ==> 검색어 ' #개인설정'
# bash wsl_batch_install.sh
@pinedance
pinedance / add_gitmodules.py
Last active July 16, 2020 05:21
Script to batch register git sub moudles of INI data type
# Script to batch register git sub moudles of INI data type
# Usage : python add_modules.py YOUR_SUBMODULEFILE
# Do not name the YOUR_SUBMODULEFILE ".gitmodules". or There will be a duplicate problem inside ".gitmodules".
import sys
import configparser
import subprocess
CONFIG_FILE = sys.argv[1].strip()
EXCUTE = "git submodule add \"{}\" \"{}\" -b \"{}\" --depth 1 || true"
@pinedance
pinedance / github.css
Created June 17, 2020 11:51 — forked from theconektd/github.css
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
# 한자만 추출하는 python code
import regex as re
# hanzi 범위
cjk_range = "[\p{Han}]"
cjk_range_re = re.compile( cjk_range, re.UNICODE)
# hanzi 추출
text = "黃帝問曰太陰陽明이 爲表裏脾胃脈也라 生病而異者는 何也오. 岐伯이 對曰陰陽이 異位에 更虛更實하며 更逆更從하야 或從內하며 或從外하야 所從이 不同이라 故로 病異名也니이다. 帝曰願聞其狀也하노라. 岐伯이 曰陽者는 天氣也라 主外하고 陰者는 地氣也라 主內라 故로 陽道는 實하고 陰道는 虛라 故로 犯賊風虛邪者는 陽受之하고 食飮不節하며 起居不時者는 陰受之하니, 陽受之則入六府하고 陰受之則入五藏하나니 入六府則身熱不時臥하고 上爲喘呼하며 入五藏則䐜滿閉塞하야 下爲飱泄하며 久爲腸澼이라 故로 喉主天氣하고 咽主地氣라 故로 陽受風氣하고 陰受濕氣라 故로 陰氣는 從足上行至頭而下行循臂至指端하고 陽氣者는 從手上行至頭而下行至足故로 曰陽病者는 上行極而下하고 陰病者는 下行極而上故로 傷於風者는 上先受之하고 傷於濕者는 下先受之니이다."
@pinedance
pinedance / ImprovingAngular.js
Created May 8, 2016 10:15
Improving Angular performance with 1 line of code
myApp.config(['$compileProvider', function ($compileProvider) {
$compileProvider.debugInfoEnabled(false);
}]);
// https://medium.com/swlh/improving-angular-performance-with-1-line-of-code-a1fb814a6476#.tlg94lab7
@pinedance
pinedance / ImprovingAngular.js
Created May 8, 2016 10:15
Improving Angular performance with 1 line of code
myApp.config(['$compileProvider', function ($compileProvider) {
$compileProvider.debugInfoEnabled(false);
}]);
//
@pinedance
pinedance / del_emptyline.rb
Created May 8, 2016 10:03
remove empty lines
def del_emptyline( line_delimiter = "\n" )
self.gsub(/^\s*$#{line_delimiter}/, '')
end
@pinedance
pinedance / del_comment.rb
Created May 8, 2016 10:02
remove comments (ruby)
def del_comment( comment_delimiter="#" )
self.gsub(/#{comment_delimiter}.*$/, '')
end