Skip to content

Instantly share code, notes, and snippets.

@munho
munho / Volley.md
Last active August 29, 2015 14:10 — forked from benelog/Volley.md

안드로이드 개발에서 많은 비중을 차지하는 UI패턴은 ListView에서 여러 이미지를 보여주는 Activity입니다. 전형적인 흐름을 정리하면 아래와 같습니다.

​1. 목록조회 API호출

​2. API를 파싱하고 ListView에 데이터를 보여 줌.

​3. 각 아이템마다의 이미지 주소로 다시 서버를 호출

​4. 이미지를 디코딩하고 ImageView에서 보여줌.

@munho
munho / gist:ca15927c02ea42ab5ccf
Last active July 18, 2018 10:13
proguard in cordova ionic android app
# ionic
-keep class org.apache.cordova.** { *; }
-keep public class * extends org.apache.cordova.CordovaPlugin
-keep class com.ionic.keyboard.IonicKeyboard.** { *; }
-keepclassmembers class com.your.package.YourWebViewClass$JSInterfaceClass {
public *;
}
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
http://www.tagwith.com/question_290772_how-to-use-proguard-in-cordova-android-app
JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home
@munho
munho / gist:c550f5bcaa7eec3fcc6f
Created March 5, 2015 23:44
'vi'" for Git on Mac OS
Fixing "There was a problem with the editor 'vi'" for Git on Mac OS X Snow Leopard
error: There was a problem with the editor ‘vi'
$ git config --global core.editor /usr/bin/vim
http://tooky.co.uk/there-was-a-problem-with-the-editor-vi-git-on-mac-os-x/
find ./ -name \*.java -type f | \
(while read file; do \
iconv -f CP949 -t UTF-8 "$file" | sponge "$file"; \
done);
@munho
munho / gist:fc2d469e5b7e1357e4a0
Created March 5, 2015 23:50
build timestamp log
export BUILD_NUMBER=${USER}-`date +%Y%m%d-%H%M%S`
$ echo "hello" | tee logfile_$(date '+%Y%m%d-%H%M%S').txt
hello
$ ls logfile_*
logfile_20130821-101235.txt
$ date '+%Y%m%d-%H%M%S'
20140302-091211
progname 2>&1 | tee tempfile ; textmate tempfile
Put this into ~/.gradle/gradle.properties
RELEASE_STORE_FILE={path to your keystore}
RELEASE_STORE_PASSWORD=*****
RELEASE_KEY_ALIAS=*****
RELEASE_KEY_PASSWORD=*****
Modify your build.gradle like this:
@munho
munho / smi2srt.py
Last active August 29, 2015 14:22
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@package smi2srt
@brief this module is for convert .smi subtitle file into .srt subtitle
(Request by Alfred Chae)
Started : 2011/08/08
license: GPL

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@munho
munho / imageset.sh
Created May 16, 2016 23:36 — forked from kukat/imageset.sh
Xcode 5 imageset generator
#!/usr/bin/env bash
SOURCE_PATH=$1
for f in "$SOURCE_PATH"/*.png; do
fullname=$(basename "$f")
filename=${fullname%@2x.*}
imageset="$SOURCE_PATH"/"$filename".imageset
jsonfile="$imageset"/Contents.json