Skip to content

Instantly share code, notes, and snippets.

@gakuzzzz
gakuzzzz / sbt-coursier.md
Last active June 27, 2019 03:23
あなたの sbt update を爆速にする sbt-coursier の紹介

あなたの sbt update を爆速にする sbt-coursier の紹介

この記事は Scala Advent Calendar 2016(Adventar) 10日目の記事です。

今は 12/10 の 625時です。年明けなんて無かった。いいね?

さてさて、sbt の依存jarのダウンロードが遅い、というのは割とよく言われる事であります。

で、この原因の一旦に、sbtが Apache Ivy を使っている、という点があります。

services:
play:
image: ingensi/play-framework
ports:
- 9000:9000
links:
- eventstore
volumes:
- .:/app
volumes_from:
@Calzzetta
Calzzetta / pool_cx_oracle.py
Created January 30, 2015 19:50
Connection pool with cx_Oracle
import cx_Oracle
def perform_query(query, bind_variables):
connection = db_pool.acquire()
cursor = connection.cursor()
cursor.execute(query, bind_variables)
result = cursor.fetchall()
cursor.close()
db_pool.release(connection)
return result
@numa08
numa08 / git-svn-clone-fetch.md
Created March 20, 2014 03:00
人間git-svnとして生きる

SubversionとGit中央リポジトリのコードを綺麗に取得する方法

git中央リポジトリとSubversionリポジトリの両方にpush(commit)する必要があるケースを想定。

既にgit中央リポジトリとSubversionリポジトリに何度かcommit(push)が実施されているコードを取得する場合、単純にgit svn cloneを行うと、gitのログと異なるハッシュでログが生成されてしまう。

それを防ぐにはgit clone後にSubversionの情報を取得する必要がある。

git clone ${git central repository} ${dir name}

cd ${dir name}

@TakahikoKawasaki
TakahikoKawasaki / gist:8159741
Created December 28, 2013 13:55
JavaScript で文字数、UTF-8 でのバイト数、サロゲートペアの数を数える
<!DOCTYPE html>
<html>
<!--
* Copyright (C) 2013 Neo Visionaries Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@Cside
Cside / get_git_branch_name.zsh
Created March 23, 2012 04:01
get_git_branch_name.zsh
#!zsh
function git_info() {
local info
if test -z $(git rev-parse --git-dir 2> /dev/null); then
info=''
else
info="${$(git symbolic-ref HEAD 2> /dev/null)#refs/heads/}"
fi
echo -n "$info"
}