- JDKがinstall済みであること
- java コマンドに環境変数Pathが通っていること
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Simple sound playback using ALSA API and libasound. | |
* | |
* Compile: | |
* $ cc -o play sound_playback.c -lasound | |
* | |
* Usage: | |
* $ ./play <sample_rate> <channels> <seconds> < <file> | |
* | |
* Examples: |
この記事は、C++ (fork) Advent Calendar 2013の12日目の記事です。
記事を書く人が居ないみたいなので、C++初心者ですが箸休め的な記事を書こうと思い立ち、いざ書き上げてみたら思いの外長くなりました。
この記事は、C++初心者な著者が、C++を用いて競技プログラミングをするために、調べたことや試した事などのまとめです。 記事中に誤り、問題点やご指摘、ご質問等ありましたら、@rigibunまでご連絡下さい(特にpush_bach)
githubのmarkdownを使いたかったことと、変更履歴が見られることからgistで書きました。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Amazon で使った金額の合計を出す奴 | |
// | |
// 使い方: | |
// 1. 全部コピーする (右上の Raw をクリックした先でやるのが楽) | |
// 2. Amazon の注文履歴ページ ( https://www.amazon.co.jp/gp/css/order-history/ ) を開く | |
// 3. F12 または 右クリ→要素の検証 とかで出てくる開発者ツールのコンソール (JavaScript REPL) にペースト | |
// 4. エンターで実行 | |
// (Firefox はなんか allow pasting とタイプしろみたいなことを言われるので従う) | |
// 5. しばらく待つと alert で合計金額を表示 | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.twitter.finagle.{Http, Service} | |
import com.twitter.util.{Await, Future} | |
import java.net.URI | |
import org.jboss.netty.handler.codec.http._ | |
object Proxy extends App { | |
val service = new Service[HttpRequest, HttpResponse] { | |
def apply(req: HttpRequest): Future[HttpResponse] = { | |
val client = Http.newService(s"${new URI(req.getUri).getAuthority}:80") | |
val res = client(req) |
あまり機会はないかもしれませんが Apache Tomcat 自身で SSL を行う場合、Java のキーストアファイルが必要です。
これは Jenkins でも同じです。
このキーストアファイルは以下の手順で作ることができます。 tomcat doesn't deliver intermediate certificate (https) を参考にしました。
export JAVA_HOME=/opt/jre1.8.0_65
export PATH=$PATH:$JAVA_HOME/bin
export PATH=/usr/local/openssl-1.0.1p/bin:$PATH