Skip to content

Instantly share code, notes, and snippets.

@tlync
tlync / gist:6694291
Created September 25, 2013 02:06
minimum DDD base
class Id[V](val id: V)
trait Entity[T <: Id[_]] {
val id: T
}
case class User(id: Id[String]) extends Entity[Id[String]]
trait Repository[ID <: Id[_], E <: Entity[ID]] {
def find(id: ID): E
@tlync
tlync / gist:5855758
Last active December 18, 2015 22:39
InteliJ IDEA Keybindings

自分用 Intelij IDEA Keybindings

Key Action Note
C + ; Complettion
S + C + ; Smart Completion
⌘ + . Next Error
⌘ + S + . Previous Error
C + ' Quick Fix
C + S + T Open Testing Pair
@tlync
tlync / .sbtconfig
Last active December 14, 2015 16:29
SBT_OPTS="-Dfile.encoding=UTF-8 -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M"
diff --git a/dict/dict.mak b/dict/dict.mak
index 49435d6..eea60e6 100644
--- a/dict/dict.mak
+++ b/dict/dict.mak
@@ -6,7 +6,7 @@
DICT = migemo-dict
DICT_BASE = base-dict
-SKKDIC_BASEURL = http://openlab.ring.gr.jp/skk/dic
+SKKDIC_BASEURL = http://www.ring.gr.jp/archives/elisp/skk/dic
--- a/src/wordbuf.c 2011-08-15 02:57:05.000000000 +0900
+++ b/src/wordbuf.c 2011-08-15 02:57:17.000000000 +0900
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#include "wordbuf.h"
#define WORDLEN_DEF 64
--- a/dict/dict.mak
+++ b/dict/dict.mak
@@ -6,7 +6,7 @@
DICT = migemo-dict
DICT_BASE = base-dict
-SKKDIC_BASEURL = http://openlab.ring.gr.jp/skk/dic
+SKKDIC_BASEURL = http://www.ring.gr.jp/archives/elisp/skk/dic
SKKDIC_FILE = SKK-JISYO.L
EUCJP_DIR = euc-jp.d
@tlync
tlync / jquery-fastclick.js
Created May 18, 2012 11:23
jquery-fastclick.js
(function($){
var hasTouch = 'ontouchstart' in window
$.fn.fastclick = function(fn, delay, amount){
delay = delay || 50
amount = amount || 10
// browser fallback
if(!hasTouch){
@tlync
tlync / reload-iphonesimulator-safari.scpt
Created March 7, 2012 10:45
Reload a web page on iPhone Simulator
tell application "System Events"
tell process "iPhone Simulator"
click button "Reload" of window 1
end tell
end tell
@tlync
tlync / gist:1992497
Created March 7, 2012 10:54
Reload a web page on iPhone Simulator (elisp)
(defun web-reload-iphonesimulator ()
"Reload a page on iPhone Simulator. Run process associated to the *Messages* buffer"
(interactive)
(start-process-shell-command
"iphonesimulator-process"
"*Messages*"
"osascript -e 'tell application \"System Events\"' -e 'tell process \"iPhone Simulator\"' -e 'click button \"Reload\" of window 1' -e 'end tell' -e 'end tell'"))
@tlync
tlync / xui-tap.js
Created October 14, 2011 10:17
tap for xui
(function(){
var hasTouch = 'ontouchstart' in window;
x$.extend({
tap: function(fn, delay){
// browser fallback
if(!hasTouch){
return this.each(function(){
x$(this).click(fn);