Skip to content

Instantly share code, notes, and snippets.

View hisamekms's full-sized avatar

Shinnosuke Ooyama hisamekms

  • Japan
View GitHub Profile
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.akhikhl.gretty:gretty:+'
}
}
apply plugin: 'org.akhikhl.gretty'
@hisamekms
hisamekms / build.gradle
Last active August 29, 2015 14:08
GradleでプロジェクトごとにCopy.expandの引数を切り替える ref: http://qiita.com/hisamekms/items/cf666e3b3748a1e201ea
ext {
props = [
hoge: 'proj-b'
]
}
@hisamekms
hisamekms / file0.txt
Created October 31, 2014 08:11
Xcode Organizerのプロキシ設定 ref: http://qiita.com/hisamekms/items/23d0c8dd01f9568f0979
http.proxyHost=your.proxy.host
http.proxyPort=8080
@hisamekms
hisamekms / file0.txt
Last active August 29, 2015 14:07
Yes/Noで答えるプロンプト ref: http://qiita.com/hisamekms/items/b8b07a64facff399c721
#!/bin/zsh
while true; do
read Answer\?'Do you like coffee? [Y/n]'
case $Answer in
'' | [Yy]* )
echo Yes!
break;
;;
[Nn]* )
echo No!
@hisamekms
hisamekms / file0.txt
Created October 9, 2014 16:05
TiShadowがiPhone6と6Plusに対応していた ref: http://qiita.com/hisamekms/items/cfb4c6e8e5fbb467134d
sudo npm i -g dbankier/tishadow --unsafe-perm
@hisamekms
hisamekms / alloy.js
Last active August 29, 2015 14:07
TitaniumでiPhone 6を判定する ref: http://qiita.com/hisamekms/items/41eb6689c7423dce9e01
var platformHeight = Ti.Platform.displayCaps.platformHeight;
Alloy.Globals.isIPhone6Plus = platformHeight === 736;
Alloy.Globals.isIPhone6 = platformHeight === 667;
Alloy.Globals.isIPhone5 = platformHeight <= 568;
@hisamekms
hisamekms / docker.service
Created August 19, 2014 02:49
IntraにDocker Registryを立てたときはNO_PROXYも忘れずに ref: http://qiita.com/hisamekms/items/fc47d0ccf2c69268ae71
...
[Service]
...
Environment="HTTP_PROXY=YOUR.PROXY.HOST:PORT"
Environment="NO_PROXY=NO.PROXY.HOST1,NO.PROXY.HOST2"
ExecStart=/usr/bin/docker -d -s=btrfs -r=false -H fd://
...
@hisamekms
hisamekms / file0.txt
Created July 22, 2014 15:58
FFmpeg 静止画と音声から動画を作成する ref: http://qiita.com/hisamekms/items/44caedbe8d8106536b4e
brew install ffmpeg
@hisamekms
hisamekms / HelloResource.java
Created July 17, 2014 04:08
Jersey Test FrameworkとGuiceを一緒に使う ref: http://qiita.com/hisamekms/items/85de686f32d3a5d6fd4f
package web.resources;
import web.MyApplication;
import org.glassfish.jersey.test.DeploymentContext;
import org.glassfish.jersey.test.JerseyTest;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
@hisamekms
hisamekms / JpaSessionCustomizer.java
Created June 17, 2014 05:47
EclipseLinkのログをSlf4Jにブリッジする ref: http://qiita.com/hisamekms/items/2ef7c224534591810ed6
package misc.jpa;
import org.eclipse.persistence.config.SessionCustomizer;
import org.eclipse.persistence.sessions.Session;
public class JpaSessionCustomizer implements SessionCustomizer {
@Override
public void customize(Session sn) throws Exception {
sn.setSessionLog(new Slf4jSessionLogger());