Skip to content

Instantly share code, notes, and snippets.


Bohyung kim dsdstudio

View GitHub Profile
dsdstudio /
Last active Feb 7, 2021
java sha-512 encryption
* sha512 방식으로 암호화한 스트링을 리턴한다
* @param target
* @return [encrypted string]
public final static String encryptSHA512(String target) {
try {
MessageDigest sh = MessageDigest.getInstance("SHA-512");
dsdstudio / logback.xml
Created Jan 25, 2016
logback rollingfileappender + gzip compression
View logback.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- debug=true 해주는이유는 설정이 잘못되었는지 미리 판단이 가능하기 때문이다 -->
<configuration debug="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
View locale.swift
let c = try NSString(contentsOfFile: path, encoding: CFStringConvertEncodingToNSStringEncoding(0x0422))
} catch {
dsdstudio / Apple_mobile_device_types.txt
Created Dec 22, 2019 — forked from adamawolf/Apple_mobile_device_types.txt
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
View Apple_mobile_device_types.txt
i386 : iPhone Simulator
x86_64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
iPhone5,1 : iPhone 5 (GSM)
dsdstudio /
Created Nov 30, 2019
jwt token create and validation
import com.auth0.jwt.JWT;
import com.auth0.jwt.JWTVerifier;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.interfaces.DecodedJWT;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
class Scratch {
dsdstudio /
Created May 14, 2019
jooq jpa entity로 부터 뽑아내기
import org.jooq.codegen.DefaultGeneratorStrategy;
import org.jooq.meta.Definition;
public class JQPrefixGeneratorStrategy extends DefaultGeneratorStrategy {
public String getJavaClassName(Definition definition, Mode mode) {
return "JQ" + super.getJavaClassName(definition, mode);
dsdstudio / ff2cv.cpp
Created Feb 23, 2019 — forked from yohhoy/ff2cv.cpp
Read video frame with FFmpeg and convert to OpenCV image
View ff2cv.cpp
* Read video frame with FFmpeg and convert to OpenCV image
* Copyright (c) 2016 yohhoy
#include <iostream>
#include <vector>
// FFmpeg
extern "C" {
#include <libavformat/avformat.h>
dsdstudio /
Last active Oct 19, 2018
Rails request body gzip deflate

Rails5.x config/initializers/mime_types.rb

Mime::Type.register "gzip/json", :gzipjson

ActionDispatch::Http::Parameters::DEFAULT_PARSERS[:gzipjson] = lambda do |raw_body|
  body = ActiveSupport::Gzip.decompress(raw_body)
dsdstudio /
Created Oct 13, 2018 — forked from steve-jansen/
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X


sudo curl -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
dsdstudio / ipojo.gradle
Last active Oct 1, 2018
gradle -> felix-ipojo bytecode manipulation
View ipojo.gradle
apply plugin: "osgi"
apply plugin: "java"
apply plugin: "maven"
version = "0.0.1"
buildscript {
repositories {