Skip to content

Instantly share code, notes, and snippets.

View bbirec's full-sized avatar

Heehong Moon(문희홍) bbirec

View GitHub Profile
@bbirec
bbirec / gist:5636847
Last active December 17, 2015 16:09
Android TimeAgo in Korean.
import java.util.Calendar;
import java.util.Date;
public class TimeAgo {
public static String timeAgoString(Date date) {
Calendar now = Calendar.getInstance();
Calendar c = Calendar.getInstance();
if(date != null){
@bbirec
bbirec / gist:5541650
Created May 8, 2013 16:26
scale and draw watermark on the image.
(ns oneroom.image
(:import javax.imageio.ImageIO
java.awt.image.BufferedImageOp
java.awt.geom.AffineTransform
java.awt.Image
java.io.File
org.imgscalr.Scalr)
(:refer-clojure :exclude [load]))
(defn load [f]
@bbirec
bbirec / gist:5494147
Created May 1, 2013 07:21
Relative layout trick
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout android:id="@+id/map_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
@bbirec
bbirec / gist:3788714
Created September 26, 2012 15:29
clojure-mode-hook
(defun customize-clojure-mode ()
(paredit-mode 1)
(local-set-key (kbd "M-{") 'paredit-wrap-curly)
(local-set-key (kbd "M-}") 'paredit-close-curly-and-newline)
(local-set-key (kbd "M-[") 'paredit-wrap-square)
(local-set-key (kbd "M-]") 'paredit-close-square-and-newline))
(add-hook 'clojure-mode-hook 'customize-clojure-mode)