Skip to content

Instantly share code, notes, and snippets.

View nobuoka's full-sized avatar

Nobuoka Yu nobuoka

View GitHub Profile
@nobuoka
nobuoka / build.gradle
Last active August 6, 2018 10:49
Android アプリ開発における複数スレッドでの SQLite 使用に関する調査。
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
tasks.withType(JavaCompile) {
@nobuoka
nobuoka / JavaAptPlugin.groovy
Last active September 28, 2017 09:23
Java Annotation Processing Task for Gradle
// buildSrc/src/main/groovy/JavaAptPlugin.groovy
class JavaAPT extends DefaultTask {
private File _destinationDir
def getDestinationDir(dir) { _destinationDir }
void setDestinationDir(dir) {
_destinationDir = dir
outputs.dir _destinationDir
}
@nobuoka
nobuoka / typetalk_post.groovy
Last active August 29, 2015 13:57
Typetalk のトピックに投稿する Groovy のサンプルコード
// clientId や clientSecret、topicId を設定して、groovy コマンドでこのファイルを実行すれば動きます。 (指定のトピックに投稿されます。)
// このサンプルコードはコピペ等でご自由にお使いください。 (問題が発生しても責任は負いかねます。)
String clientId = "XXXX"
String clientSecret = "XXXX"
// 投稿先トピックの ID
String topicId = "XXXX"
// 投稿するメッセージ
String message = "Groovy でこんにちは!"
$ proxychains ssh xxx.xxx
ProxyChains-3.1 (http://proxychains.sf.net)
|DNS-request| xxx.xxx
|S-chain|-<>-127.0.0.1:1080-<><>-X.X.X.X:XX-<><>-OK
|DNS-response|: xxx.xxx is not exist
ssh: Could not resolve hostname xxx.xxx: Unknown error
@nobuoka
nobuoka / GoogleHttpJavaClientExample.java
Created November 8, 2014 11:20
google-http-java-client を使用するサンプルコード
import java.io.IOException;
import com.google.api.client.http.GenericUrl;
import com.google.api.client.http.HttpRequest;
import com.google.api.client.http.HttpRequestFactory;
import com.google.api.client.http.HttpResponse;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.javanet.NetHttpTransport;
public class GoogleHttpJavaClientExample {
@nobuoka
nobuoka / eclipse_setup.markdown
Last active August 29, 2015 14:27
Eclipse setup for Java EE development

Eclipse のセットアップ

Windows で Java EE 開発をするための Eclipse の準備方法。

Eclipse のインストール

Eclipse のダウンロードページ より、「Eclipse IDE for Java EE Developers」 をダウンロードして展開する。

プラグイン

@nobuoka
nobuoka / eclipse_setup.markdown
Created August 16, 2015 09:59
Setup Eclipse for Scala development

Eclipse のセットアップ

Windows で Scala 開発をするための Eclipse の準備方法。

Eclipse および Scala IDE for Eclipse のインストール

Eclipse 本体

Eclipse のダウンロードページ より、「Eclipse IDE for Java Developers」 をダウンロードして展開する。

@nobuoka
nobuoka / error.txt
Last active April 27, 2016 03:28
build ディレクトリだけからなる NuGet パッケージを作成してインストールを試すとこういうエラーが起こる
Install-Package : パッケージ 'XXX 1.0.0' をインストールできませんでした。
このパッケージを 'Windows,Version=v0.0' を対象とするプロジェクトにインストールしようとしていますが、
そのフレームワークと互換性があるアセンブリ参照またはコンテンツ ファイルがパッケージに含まれていません。
詳細については、パッケージの作成者に問い合わせてください。
@nobuoka
nobuoka / commit-built-files-to-gh-pages-branch.markdown
Last active November 22, 2019 15:38
The way to commit built files in subdirectory to gh-pages branch from an arbitrary branch

Committing a subfolder to the gh-pages branch from the other branch

Sometimes you want to commit a subfolder on an arbitrary branch (rather than gh-pages branch) as the root directory to the gh-pages branch. You will want to do so when, for example, the files to be published on GitHub Pages are generated by a build system.

This document shows the way to commit a build/gh-pages directory to the gh-pages branch by using Git plumbing commands. In the following example, Windows PowerShell is used as a shell environment.

Step 1 : Create a tree object

package info.vividcode;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
* すぐに実行終了するコマンド (外部プロセス) を実行するクラス。