Skip to content

Instantly share code, notes, and snippets.

View thomasJang's full-sized avatar
๐ŸŽฏ
Focusing

JANG KI-YOUNG thomasJang

๐ŸŽฏ
Focusing
View GitHub Profile
@thomasJang
thomasJang / asyncPromise.js
Last active August 19, 2020 05:48
asyncPromise.js
axisj.promise = function () {
// ํ”„๋ผ๋ฏธ์Šค
var myClass = function () {
this.busy = false;
this.queue = [];
this.then = function (fn) {
this.queue.push(fn);
@thomasJang
thomasJang / asyncPromise-sample.js
Created March 7, 2017 16:15
asyncPromise.js example
ax.promise()
.then(function (ok, fail, data) {
$.ajax({
url: "/api/v1/connections",
callback: function (res) {
ok(res); // data ๋กœ ์ „๋‹ฌ
},
onError: function (res) {
fail(res);
}
@thomasJang
thomasJang / OSS-report.html
Created March 9, 2017 04:24
[sample]OSS Report
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no">
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
var gulp = require('gulp');
var concat = require('gulp-concat');
gulp.task('concat', function(){
gulp.src('src/js/*.js')
.pipe(concat('all.js'))
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['concat'], function(){
@thomasJang
thomasJang / array-to-md.js
Created April 6, 2017 03:23
array-to-md.js
function (array, columns) {
let tableRow = [], table = "", trl, tcl;
// Generate column list
let cols = columns ? columns.split(",") : Object.keys(array[0]);
// Generate table headers
tableRow.push(cols);
// Generate table header seperator
// Node: Export function
if (typeof module !== "undefined" && module.exports) {
module.exports = exportObject;
}
// AMD/requirejs: Define the module
else if (typeof define === 'function' && define.amd) {
define(function () {return exportObject;});
}
// Browser: Expose to window
@thomasJang
thomasJang / AX5File.java
Created May 28, 2017 10:48
AX5Upload JAVA
package com.chequer.ax5.api.demo.entity.file;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import org.apache.commons.io.FilenameUtils;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.time.LocalDateTime;
@thomasJang
thomasJang / jsonObject.java
Created May 31, 2017 11:13
JsonUtils.fromJsonToList
List swipeList = JsonUtils.fromJsonToList("[" +
"{'id':'slide_one', 'video':'intro_for_web', 'title':'Open the SQLGate', 'stitle':'๋น ๋ฅด๊ณ  ๊ฐ•๋ ฅํ•œ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๋งŒ๋Šฅ ๋„๊ตฌ', " +
"'desc':'SQLGate๋Š” ๊ฐ•๋ ฅํ•œ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ฟผ๋ฆฌ ๋„๊ตฌ์™€ ํ•จ๊ป˜ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค์— ํ•„์š”ํ•œ ๋ชจ๋“  ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์‚ฌ์šฉ์ž/๊ฐœ๋ฐœ์ž/DBA๋ฅผ ์œ„ํ•œ ๋งŒ๋Šฅ ๋„๊ตฌ ์ž…๋‹ˆ๋‹ค. SQLGate๋ฅผ ํ†ตํ•ด ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์—…๋ฌด ํ˜์‹ ์„ ์ด๋ค„๋ณด์„ธ์š”!'}, " +
"{'id':'slide_two', 'video':'oracle_for_web', 'title':'SQLGate for Oracle', 'stitle':'SQL๊ฒŒ์ดํŠธ๋ฅผ ์—ด๋‹ค, ๋ฐ์ดํ„ฐ์˜ ๋ฐ”๋‹ค ์œ„๋ฅผ ๋‚ ๋‹ค.', " +
"'desc':'Oracle SQL Net ์—†์ด๋„ ์˜ค๋ผํด ์„œ๋ฒ„์— ์ ‘์†ํ•˜์—ฌ ๋‹ค์–‘ํ•œ ์งˆ์˜๋ฅผ ํ†ตํ•ด ์›ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ๋„๋ก ๊ฐ•๋ ฅํ•œ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜์—ฌ ๊ฐœ๋ฐœ์ž๋“ค์—๊ฒŒ ์ตœ์ ์˜ ํŽธ๋ฆฌํ•จ๊ณผ ์ƒ์‚ฐ์„ฑ์„ ๋†’์—ฌ์ฃผ๋Š” ๊ฐœ๋ฐœํˆด์ž…๋‹ˆ๋‹ค.'}, " +
"{'id':'slide_three', 'video':'ms_for_web', 'title':'SQLGate for SQLServer', 'stitle':'SQL๊ฒŒ์ดํŠธ๋ฅผ ์—ด๋‹ค, ๋ฐ์ดํ„ฐ๋ฅผ ๊ฑด์ ธ ์˜ฌ๋ฆฌ๋‹ค', " +
"'desc':'COM ๊ธฐ๋ฐ˜์˜ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ํ†ตํ•ด OLE DB ๋ฅผ ์ด์šฉํ•˜์—ฌ ๊ฐ€๋ณ๊ณ  ์†์‰ฌ์šด ๋ฐฉ๋ฒ•์œผ๋กœ Microsoft SQL Server์— ์ ‘์†ํ•˜์—ฌ ๊ฐœ๋ฐœ์ž๊ฐ€ ์›ํ•˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ถ”์ถœํ•ด ๋‚ผ ์ˆ˜ ์žˆ๋Š” ์–ดํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ž…๋‹ˆ๋‹ค.'}, " +
"{'id':'slide_four', 'video':'db2_for_web', 'title':'SQLGate for DB2', 'stitle':'SQL๊ฒŒ์ดํŠธ๋ฅผ ์—ด๋‹ค, ๋งคํŠธ๋ฆญ์Šค์— ์ ‘์†ํ•˜๋‹ค', " +
"'desc':'IBM DB2 ์˜ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ๊ฐœ๋ฐœ๊ณผ ๊ด€๋ฆฌ๋ฅผ
@thomasJang
thomasJang / RequestUtils.jsp
Created June 7, 2017 11:49
RequestUtils.jsp
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ page import="com.chequer.sqlgate.pms.core.utils.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ax" tagdir="/WEB-INF/tags" %>
<%
String licenseType = RequestUtils.of(request).getString("licenseType", "business");
String buyType = RequestUtils.of(request).getString("buyType", "new");
request.setAttribute("licenseType", licenseType);
request.setAttribute("buyType", buyType);
@thomasJang
thomasJang / materialize.scss
Created July 6, 2017 05:58
materialize.scss
@charset "UTF-8";
// Mixins
@import "components/mixins";
@import "components/color";
// Variables;
@import "components/variables";
// Reset