Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

View nobuoka's full-sized avatar

Nobuoka Yu nobuoka

Software engineer.I'm interested in Web applications (Kotlin, Java, TypeScript, JavaScript, Ruby, Perl, etc.), Android apps, UWP apps.
View GitHub Profile
@nobuoka
nobuoka /generic_test_coverage.ja.markdown
Last activeMarch 24, 2021 08:27
generic_test_coverage.rb (fastlane action)

概要

  • fastlane のアクション
  • iOS プロジェクトのビルド結果である result bundle (.xcresult 拡張子) に含まれるカバレッジ情報からSonarQube の Generic Coverage を生成する
  • 内部ではxccov コマンドが使用される
// === ドメインレイヤ ===
sealedclassFizzBuzzValue {
abstractval expression:String
data classNumber(overridevalexpression:String) : FizzBuzzValue()
object Fizz : FizzBuzzValue() {overrideval expression:String="Fizz" }
object Buzz : FizzBuzzValue() {overrideval expression:String="Buzz" }
object FizzBuzz : FizzBuzzValue() {overrideval expression:String="FizzBuzz" }
}
@nobuoka
nobuoka /ExceptionWithEither.kt
Last activeFebruary 10, 2023 06:56
Kotlin における、呼び出し側に処理して欲しい例外の扱い方を検討する。
importjavax.ws.rs.WebApplicationException
importjavax.ws.rs.core.Response
// 使う側の例。
funmain(args:Array<String>) {
FooApplicationService.fetchFoo("taro","").then {
when (it) {
isEither.Right->Response.ok().entity(it.value)
isEither.Left->when (it.value) {
packageinfo.vividcode;
importjava.io.BufferedInputStream;
importjava.io.ByteArrayOutputStream;
importjava.io.IOException;
importjava.util.List;
importjava.util.concurrent.TimeUnit;
/**
*すぐに実行終了するコマンド (外部プロセス)を実行するクラス
@nobuoka
nobuoka /commit-built-files-to-gh-pages-branch.markdown
Last activeNovember 22, 2019 15:38
The way to commit built files in subdirectory to gh-pages branch from an arbitrary branch

Sometimes you want to commit a subfolder on an arbitrary branch (rather thangh-pages branch) as the root directoryto thegh-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 abuild/gh-pages directory to thegh-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

@nobuoka
nobuoka /error.txt
Last activeApril 27, 2016 03:28
build ディレクトリだけからなる NuGet パッケージを作成してインストールを試すとこういうエラーが起こる
Install-Package : パッケージ 'XXX 1.0.0' をインストールできませんでした。
このパッケージを 'Windows,Version=v0.0' を対象とするプロジェクトにインストールしようとしていますが、
そのフレームワークと互換性があるアセンブリ参照またはコンテンツ ファイルがパッケージに含まれていません。
詳細については、パッケージの作成者に問い合わせてください。
@nobuoka
nobuoka /eclipse_setup.markdown
CreatedAugust 16, 2015 09:59
Setup Eclipse for Scala development

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

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

Eclipse 本体

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

@nobuoka
nobuoka /eclipse_setup.markdown
Last activeAugust 29, 2015 14:27
Eclipse setup for Java EE development

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

Eclipse のインストール

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

プラグイン

@nobuoka
nobuoka /GoogleHttpJavaClientExample.java
CreatedNovember 8, 2014 11:20
google-http-java-client を使用するサンプルコード
importjava.io.IOException;
importcom.google.api.client.http.GenericUrl;
importcom.google.api.client.http.HttpRequest;
importcom.google.api.client.http.HttpRequestFactory;
importcom.google.api.client.http.HttpResponse;
importcom.google.api.client.http.HttpTransport;
importcom.google.api.client.http.javanet.NetHttpTransport;
publicclassGoogleHttpJavaClientExample {
$ 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
NewerOlder

[8]ページ先頭

©2009-2025 Movatter.jp