Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# EXIF date converter
# Dependencies
# $ pip install piexif
import argparse
import datetime
import sys
@jongyeol
jongyeol / LettuceClientCustomLatencyTest.java
Created October 1, 2018 12:13
LettuceClientCustomLatencyTest.java
import java.net.SocketAddress;
import java.util.Collections;
import java.util.Map;
import org.junit.Test;
import io.lettuce.core.RedisClient;
import io.lettuce.core.api.StatefulRedisConnection;
import io.lettuce.core.metrics.CommandLatencyCollector;
import io.lettuce.core.metrics.CommandLatencyId;
@jongyeol
jongyeol / to-nfc.pl
Created November 27, 2017 06:55
nfc-nfd
#!/usr/bin/env perl
use 5.010;
use strict;
use warnings;
use Encode qw/encode decode/;
use Unicode::Normalize qw/compose/;
while(<>) {
my $line = compose(decode('utf8',$_));
print encode('utf8',$line);
@jongyeol
jongyeol / Lettuce-disconnectedWriteTimeoutExceptionAndReconnectTest.java
Created April 13, 2017 13:07
Lettuce-disconnectedWriteTimeoutExceptionAndReconnectTest.java
@Test
public void disconnectedWriteTimeoutExceptionAndReconnectTest() throws Exception {
AtomicBoolean networkIsStable = new AtomicBoolean(true);
Delay reconnectDelay = Delay.exponential(1, 100, TimeUnit.MILLISECONDS, 2);
NettyCustomizer nettyCustomizer = new NettyCustomizer() {
@Override
public void afterBootstrapInitialized(Bootstrap bootstrap) {}
@jongyeol
jongyeol / ThriftTest.json
Created May 9, 2016 08:46
ThriftTest.json
{
"name": "ThriftTest",
"namespaces": {
"*": "thrift.test",
"c_glib": "TTest",
"cocoa": "ThriftTest",
"cpp": "thrift.test",
"cpp.noexist": "ThriftTest",
"csharp": "Thrift.Test",
"delphi": "Thrift.Test",
@jongyeol
jongyeol / JavaReturnTypeInfer.java
Created September 23, 2015 03:17
generic is just casting.
import java.lang.reflect.Type;
import com.fasterxml.jackson.core.type.TypeReference;
public class JavaReturnTypeInfer{
private static String speficicType() throws Exception{
TypeReference<String> tr = new TypeReference<String>(){};
Type type = tr.getType();
System.out.println(type.getTypeName()); // => java.lang.String
return (String) Class.forName(type.getTypeName()).newInstance();
@jongyeol
jongyeol / fixfileformat.py
Created January 23, 2013 15:05
detecting file encoding and line-ending, and fix it
#!/usr/bin/env python
# detecting file encoding and line-ending, and fix it
# coded by jong10
# before, you need to install chardet:
# > pip install chardet
# Usage: ./fixfileformat.py *.h *.cpp *.py
@jongyeol
jongyeol / food2sms.py
Created August 30, 2012 15:36
숭실대학교 학식 문자 메시지 프로그램 (2008)
#!/usr/bin/python
# -*- coding: utf-8 -*-
# food2sms.py
# 숭실대학교 학식 문자 메시지 프로그램
# version: 2008.05.01.b
# coded by jong10
# need: http://twill.idyll.org/
# need: http://www.crummy.com/software/BeautifulSoup/
@jongyeol
jongyeol / fallback_permalinks.js
Created August 27, 2012 13:36
for legacy permalink of articles (tumblr)
@jongyeol
jongyeol / kent_rd.txt
Created August 27, 2012 13:32
2009/09/04: 켄트 벡 세미나 후기 - 반응적 설계
2009/09/04: 켄트 벡 세미나 후기 - 반응적 설계
Kent Beck 방한 세미나
Responsive Design
세미나 기록 by 종텐(Jong10)