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
using System;
using System.Collections;
using System.Linq;
using System.Linq.Expressions;
using System.Xml;
using System.Xml.Linq;
using Humanizer;
namespace System.Xml
{
@composite
composite / AttributeDriver.cs
Last active November 11, 2015 07:57 — forked from puryfury/AttributeDriver.cs
Nancy Attrubute-Driven Module Example (Nancy 1.x or above, targeted as .NET 4.5 or later.)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
namespace Nancy
{
@composite
composite / OpenWithAtomAsAdmin.bat
Last active December 30, 2015 01:25 — forked from cometjc/OpenWithSublime.bat
Add context menu to allow user open file or folder with Atom as User or Admin. Save the raw file OpenWithAtomAsAdmin.bat into sublime folder and execute it. Forked and elevate as admin script by https://gist.github.com/jcppkkk/8330314
@echo off
@rem \"%stPath%\" : Path to Sublime Text installation dir.
@rem %UserEntry%: Key name for the registry entry.
@rem %UserMenuText% : Context menu text. Set your preferred menu text (e.g.: translate to your language).
@rem %AdminEntry%: Key name for the registry entry.
@rem %AdminMenuText% : Context menu text. Set your preferred menu text for administrator privilege (e.g.: translate to your language).
SET stPath=%~dp0atom.exe
SET UserEntry=Atom
SET AdminEntry=Atom As Admin
//http://upshots.org/javascript/javascript-regexp-to-remove-comments#comment-2851
function stripComments(stringIN) {
var SLASH = '/';
var BACK_SLASH = '\\';
var STAR = '*';
var DOUBLE_QUOTE = '"';
var SINGLE_QUOTE = "'";
var NEW_LINE = '\n';
var CARRIAGE_RETURN = '\r';
@composite
composite / SQLer.example.php
Last active December 8, 2016 13:03
Function based MySQL Convention for PHP
<?php
$sql = new SQLer('localhost', 'user', 'pass'. 'my_db');
// query_fetch example
$name = '';
$fetch = $sql->query_fetch('SELECT name, content FROM my_table LIMIT 10 WHERE name LIKE CONCAT('%', ?, '%')', $name);
// do something
?><dl><?php
$fetch->exec(function($name, $content) {
?>
<dt><?=$name?></dt>
@composite
composite / fn_lengthk.sql
Created March 23, 2017 07:38
The freaking alternative LENGTHB function for Oracle unicode environment. if one unicode calculates 3 bytes, this function will give you returning 2 bytes.
CREATE OR REPLACE FUNCTION FN_LENGTHK(PS_STR IN VARCHAR2) RETURN NUMBER IS
V_STR_LEN NUMBER;
V_STR_CHR VARCHAR2(3);
V_RES_LEN NUMBER;
/******************************************************************************
NAME: FN_LENGTHK
PURPOSE: LENGTHB์™€ ๋™์ผํ•˜๋‚˜ ์œ ๋‹ˆ์ฝ”๋“œ ํŠน์„ฑ์ƒ ํ•œ๊ธ€ 3๋ฐ”์ดํŠธ๋กœ ๊ณ„์‚ฐํ•˜๊ธฐ ๋•Œ๋ฌธ
์— 2๋ฐ”์ดํŠธ๋กœ ์ฒ˜๋ฆฌํ•˜์—ฌ ์ถœ๋ ฅํ•˜๊ธฐ ์œ„ํ•œ ๊ณตํ†ต ํ•จ์ˆ˜
์œ ๋‹ˆ์ฝ”๋“œ ๋งŒ์„ธ!
@composite
composite / 1.OracleExample.sql
Last active July 24, 2019 01:52
The example of java.util.Map to Struct and send parameter as Oracle Array for Spring 3.x + MyBatis 3.2.x with Oracle. (based in JDK 1.8, not used deprecated STRUCT, ARRAY.)
CREATE OR REPLACE TYPE TO_STUDENT IS OBJECT (
NAME VARCHAR2(20)
,AGE NUMBER(3)
,GENDER VARCHAR2(1)
,SCORE NUMBER(1,2)
,GRADE VARCHAR2(1)
);
CREATE OR REPLACE TYPE TA_STUDENTS IS TABLE OF TO_STUDENT;
@composite
composite / bitvistsshclientservice.bat
Last active February 11, 2026 04:24
Bitvise SSH Client as a Windows service with NSSM example.
@REM How to use before run this batch: You need Bitvise SSH Client and NSSM. if you haven't, google it and download and install.
@REM 1. open bitvise SSG Client
@REM 2. click "New Profile" to save profile.
@REM 3. configure SSH infomation, tunnels, etc.
@REM 4. click "Save Profile" to save profile.
@REM 5. on "sensitive" dialog popup, check "any account on this computer" or below to service account can connect it.
@REM 6. click "Login" to connect and test SSH Connection.
@REM 7. click "Accept & Save" if you see host key dialog popup.
@REM 8. Click "host key manager"
@REM 9. select your SSH host and click "Export". then click "Bitvise format" and save host key file.
@composite
composite / chromekiller.bat
Last active June 8, 2018 01:57
Kill all chrome process for shortcut on Windows (create new shortcut on desktop -> copy here and paste to run command -> change shortcut name you want (icon can change later) -> done!)
%WINDIR%\System32\cmd.exe /c "taskkill /F /IM chrome.exe & taskkill /F /IM chromedriver.exe"
@composite
composite / KakaoTalk.vbs
Last active September 17, 2018 05:26
์นด์นด์˜คํ†ก ๋Ÿฐ์ฒ˜ ํ”„๋กœ๊ทธ๋žจ (์ž๋™๋กœ๊ทธ์ธ ๋ฐ ๊ด‘๊ณ ์ œ๊ฑฐ ์›์Šคํ†ฑ ์‹คํ–‰) (์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ์€ ๋‹ค์šด๋ฐ›๊ฑฐ๋‚˜ ๋ฉ”๋ชจ์žฅ์œผ๋กœ ์˜ฎ๊ฒจ KakaoTalk.vbs ์‹์œผ๋กœ ์ €์žฅ ํ›„, ์นดํ†ก ํด๋”๋กœ ์˜ฎ๊ธฐ๊ณ  ํ•„์š”ํ•œ ํ”„๋กœ๊ทธ๋žจ์€ ์ฃผ์„ ์ฐธ์กฐํ•˜์—ฌ ๋‹ค์šด๋ฐ›์€ ๋’ค ์‹คํ–‰)
Option Explicit
Function DblQuote(Str)
DblQuote = Chr(34) & Str & Chr(34)
End Function
Dim objShell, scriptdir, rv
'์ด ์ž๋™ํ™” ํ”„๋กœ๊ทธ๋žจ์€ ์นด์นด์˜คํ†ก ๊ฒฝ๋กœ ๋‚ด์—์„œ ์‹คํ–‰ํ•˜๋Š” ๊ฒŒ ๊ธฐ๋ณธ๊ฐ’์ด๋ฏ€๋กœ, ์นดํ†ก ํด๋”๋กœ ์ด๋™.
scriptdir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
Set objShell = CreateObject("WScript.Shell")
rv = objShell.Run(DblQuote(scriptdir & "\KakaoTalk.exe"),1,False)
Set objShell = Nothing