Skip to content

Instantly share code, notes, and snippets.

💜
Work Hard, Play Hard

Eunkwang Shin gracefullight

💜
Work Hard, Play Hard
Block or report user

Report or block gracefullight

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gracefullight
gracefullight / cloudSettings
Created Feb 17, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-02-17T04:14:56.560Z","extensionVersion":"v3.4.3"}
View kubectxwin.json
{
"homepage": "https://github.com/thomasliddledba/kubectxwin",
"description": "Windows Version of the powerful tool kubectx.",
"license": "MIT",
"version": "0.1.1",
"architecture": {
"64bit": {
"url": "https://github.com/thomasliddledba/kubectxwin/releases/download/0.1.1/kubectxwin.exe",
"hash": "sha1:34703BCB9B16865541E58524B596B1AEC0E4E3D0"
}
View k8s-dashboard.yaml
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
View initSummernotes.js
/**
* textarea를 summernote로 변경
* require ['lodash', 'axios', 'summernote', 'jQuery']
* reference: https://summernote.org/deep-dive/
*
* @param {any} target summernote를 적용할 element id || class
* @param {any} options options 기본 옵션에 merge 시킬 세부 옵션
* @returns jQuery Element
*/
var initSummernotes = function(target, options) {
View remove_emoji.php
<?php
// https://stackoverflow.com/questions/12807176/php-writing-a-simple-removeemoji-function
function removeEmoji($text) {
$clean_text = "";
// Match Emoticons
$regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u';
$clean_text = preg_replace($regexEmoticons, '', $text);
// Match Miscellaneous Symbols and Pictographs
@gracefullight
gracefullight / pull.sh
Last active Dec 27, 2017
ssh key 등록 후에도 계속 public_key가 등록이 되지 않았다고 요구할 경우 (cafe24의 경우 ssh-agent를 인식하지 못 했다)
View pull.sh
# pull.sh
echo "=> Kill previous ssh agent"
for pid in `ps -ef | grep ssh-agent | awk '{print $2}'`;
do kill -9 $pid;
done
echo "=> Initialize ssh agent"
eval "$(ssh-agent)"
echo "=> add key"
View checkPersonalNumber.js
// 주민번호 체크 함수
function checkPersonalNumber(jumin) {
jumin = String(jumin);
if(jumin.length !== 13) {
return false;
}
var sum = 0;
var j = 2;
View queryToObject.js
var queryToObject = function(queryString) {
var query = queryString || location.search.replace(/\?/, "");
return query.split("&").reduce(function(obj, item, i) {
if(item) {
item = item.split('=');
obj[item[0]] = item[1];
return obj;
}
}, {});
};
View japan_address_api.html
<input type="number" id="zip">
<button type="button" onClick="search_addr();">住所検索</button>
<input type="text" id="address">
<!-- 스크립트를 로드 -->
<script src="//api.zipaddress.net/sdk/zipaddr.min.js" async></script>
<script>
var search_addr = function(){
var $zip = $('#zip');
var zip = $zip.val();
View nginx_php_ssl_virtualhost.conf
# HTTP
server {
listen 80;
server_name example.com www.example.com;
# certbot --webroot 인증을 받기위한 설정
#location ^~ /.well-known/acme-challenge/ {
# default_type "text/plain";
# root /var/www/letsencrypt;
#}
You can’t perform that action at this time.