Skip to content

Instantly share code, notes, and snippets.

View KimSeongJun's full-sized avatar

김성준 KimSeongJun

View GitHub Profile
@KimSeongJun
KimSeongJun / checkKoreanVATID.java
Last active October 31, 2020 01:07
Korean VAT ID Validations
import java.util.Arrays;
import java.util.List;
public class checkKoreanVATID{
public static void main(String []args){
System.out.println("6798700433 : " + checkKoreanVATID("6798700433"));
System.out.println("6798700434 : " + checkKoreanVATID("6798700434"));
System.out.println("6171690224 : " + checkKoreanVATID("6171690224"));
System.out.println("1138203635 : " + checkKoreanVATID("1138203635"));
@KimSeongJun
KimSeongJun / linkhub-ca-test-stream.php
Last active March 24, 2020 02:13
Linkhub Root-CA test
<?php
$header = array();
$header[] = 'Connection: close';
$params = array('http' => array(
'ignore_errors' => TRUE,
'protocol_version' => '1.0',
'method' => 'GET'
));
if ($header !== null) {
@KimSeongJun
KimSeongJun / FAXSEND.jsp
Last active October 2, 2018 06:08
NHFOOD
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>팝빌 SDK jsp Example.</title>
</head>
<%@page import="java.util.Map"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.ArrayList"%>
@KimSeongJun
KimSeongJun / JavaHttpsExample.java
Created September 14, 2018 05:24
Java TLS Test.
import java.net.URL;
import java.io.*;
import javax.net.ssl.HttpsURLConnection;
public class JavaHttpsExample
{
public static void main(String[] args) throws Exception {
String httpsURL = "https://auth.linkhub.co.kr/Time";
URL myUrl = new URL(httpsURL);
HttpsURLConnection conn = (HttpsURLConnection)myUrl.openConnection();
@KimSeongJun
KimSeongJun / gist:71b75f5fdeaee6d0bd9454d13e42e1d8
Created June 27, 2016 14:41 — forked from moneytoo/gist:ab3f34e4fddc2110675952f8280f49c5
nginx with OpenSSL 1.0.2 (ALPN) on CentOS 7
yum -y groupinstall 'Development Tools'
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel
OPENSSL="openssl-1.0.2h"
NGINX="nginx-1.11.1-1"
mkdir -p /opt/lib
wget https://www.openssl.org/source/$OPENSSL.tar.gz -O /opt/lib/$OPENSSL.tar.gz
tar -zxvf /opt/lib/$OPENSSL.tar.gz -C /opt/lib
@KimSeongJun
KimSeongJun / Sender Number filter
Last active October 15, 2015 05:07
Sender Number Filter.
private char CheckFilter(String Sender) {
if(Stringz.isNullOrEmpty(Sender)) return '2'; //발신번호 없음.
if(Sender.length() < 8 || Sender.length() > 12) return 'R';// 길이에서 일단 제외. 8이상 12 이하만 통과.
if(Sender.startsWith("00")) return 'R'; //국제 전화 제외.
switch(Sender.length()) {
case 8: //8자리는 전국대표번호만 나올수 있으므로. 15**,16**,18**으로 확인.
if(false == (Sender.startsWith("15") || Sender.startsWith("16") || Sender.startsWith("18"))) return 'R';
080\D*\d{3,4}\D*\d{4}
location / {
try_files $uri =503;
}
error_page 503 /onwork;
location /onwork {
charset UTF-8;
default_type 'application/json; charset=utf-8';
@KimSeongJun
KimSeongJun / gist:61d21b41cfa73289dbd8
Last active August 29, 2015 14:23
nginx gzip config
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/plain application/x-javascript text/xml text/css application/msxecel;
gzip_vary on;
gzip_comp_level 8;
gzip_http_version 1.1;
@KimSeongJun
KimSeongJun / gist:87f6d048fc4a3538b644
Created June 11, 2015 04:28
linkhub.sdk.pbl for pb9
forward
global type authority from nonvisualobject
end type
type hmac_info from structure within authority
end type
type systemtime from structure within authority
end type
type blobheader from structure within authority
end type
type keyblob from structure within authority