Skip to content

Instantly share code, notes, and snippets.

View composite's full-sized avatar
🤡
This is the face. 이것은 면상이다.

Ukjin Yang composite

🤡
This is the face. 이것은 면상이다.
View GitHub Profile
@composite
composite / table_def_1.sql
Created March 17, 2014 07:30
Table defination generator query for Oracle
SELECT A1.TABLE_COMMENTS
, A1.TABLE_NAME
-- , A1.COLUMN_ID
, A1.COLUMN_NAME AS COLUMN_ID
, A1.COLUMN_COMMENTS AS COLUMN_NAME
, A1.DATA_TYPE AS DATA_TYPE
, (CASE A1.DATA_TYPE WHEN 'NUMBER' THEN TO_CHAR(A1.DATA_LENGTH)
WHEN 'DATE' THEN ' '
ELSE TO_CHAR(A1.DATA_LENGTH) END) AS DATA_LENGTH
, NVL(A1.NULL_FLAG, 'N') AS NULL_FLAG
@composite
composite / all_sp_in_pkg.sql
Last active August 29, 2015 13:57
MyBatis parameter Generator for Oracle Object (empty PKG_NAME will write plain OBJ_NAME.)
--------------------------------------------------------------------------------------
-- GENEATES ALL STORED PROCEDURES ON DESIRED PACKAGE IN YOUR SCHEMA.
--------------------------------------------------------------------------------------
set pagesize 0; -- PRETTY OUTPUT FOR SQL*PLUS OR OTHER TOOLS OUTPUT.
WITH SCRT AS (
SELECT OBJECT_NAME AS PKG_NAME, PROCEDURE_NAME AS SP_NAME
, '{ CALL ' AS Q_PRE
, '}' AS Q_SUR
, 'anyMapType' AS P_MAP
FROM USER_PROCEDURES
@composite
composite / Action.java
Created April 14, 2014 04:51
.NET Action and Func class implement in Java
public interface Action {
void invoke();
public static interface $1<T1> extends Action{void invoke(T1 arg1);}
public static interface $2<T1,T2> extends Action{void invoke(T1 arg1,T2 arg2);}
public static interface $3<T1,T2,T3> extends Action{void invoke(T1 arg1,T2 arg2,T3 arg3);}
public static interface $4<T1,T2,T3,T4> extends Action{void invoke(T1 arg1,T2 arg2,T3 arg3,T4 arg4);}
public static interface $5<T1,T2,T3,T4,T5> extends Action{void invoke(T1 arg1,T2 arg2,T3 arg3,T4 arg4,T5 arg5);}
public static interface $6<T1,T2,T3,T4,T5,T6> extends Action{void invoke(T1 arg1,T2 arg2,T3 arg3,T4 arg4,T5 arg5,T6 arg6);}
Number.prototype.format = function(){
return this.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
};
@composite
composite / escapeAll.js
Created October 28, 2014 00:49
One line code snippet
(function(s){var result='';s.split('').forEach(function(a,i){result+='%'+s.charCodeAt(i).toString(16).toUpperCase();});return result;})('Welcome');
@composite
composite / readme.md
Last active August 29, 2015 14:13
Resolvr.js: A Simply, Event-Oriented Promise in Javascript. Support All major browsers, node.js and setTimeout supported any JS engines. (other Promise Thenables not yet tested.)

Resolvr: loop friendly Promise, Simplified.

NOTE: Resolvr is not besed on Promise spec.

current vertions is 0.3

How to use?

Similar as Promise. and escape from callback hell!

@composite
composite / totp.html
Created June 18, 2015 05:11
a Simple TOTP impl with js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TOTP Simple Example</title>
</head>
<body>
<h3>OTP</h3>
@composite
composite / trans-search.html
Created July 22, 2015 04:47
다음 검색 - 운송장조회 HTML 및 스크립트
<!-- 택배조회Coll -->
<style type="text/css">
#deliveryColl .collTitle {margin-bottom:16px;}
#deliveryColl .select_box {border:1px solid #7f9db7;width:135px;height:20px;font-size:12px;}
#deliveryColl .inp_txt {width:140px;height:14px;padding:4px 0 3px 2px;border-top:1px solid #ababab;border-left:1px solid #ababab;border-bottom:1px solid #ccc;border-right:1px solid #ccc;font-size:12px;line-height:14px;}
#deliveryColl .wrap_inquiry {padding-bottom:15px;border:1px solid #e8e8e8;background:#f9f9f9;}
#deliveryColl .wrap_inquiry .box_search {width:701px;padding:13px 0 0 15px;border-top:1px solid #fcfcfc;border-left:1px solid #fcfcfc;}
#deliveryColl .wrap_inquiry .info_delivery {float:left;}
#deliveryColl .wrap_inquiry .info_delivery .tit {float:left;padding-right:4px;font-size:12px;font-weight:bold;line-height:22px;color:#000;clear:both;}
#deliveryColl .wrap_inquiry .info_delivery .cont {float:left;width:154px;}
@composite
composite / ExampleHandler.cs
Last active September 9, 2015 02:22
ASP.NET 4 Routing : Attribute based HTTP Handler Routing with Example
using System;
using System.Data.SqlClient;
using System.Linq;
using System.Transactions;
using System.Web;
using System.Web.Routing;
namespace Composite.Handlers
{
@composite
composite / DapperCRUD.cs
Last active November 24, 2015 09:20
Dapper My CRUD extension
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using Dapper;