- Use
gcloud logging readto pull logs - Convert it to csv style via json2csv.rb
ruby json2csv.rb
- Use
goaccessto generate html output
| import java.io.ByteArrayInputStream; | |
| import java.io.ByteArrayOutputStream; | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.util.Base64; | |
| import java.util.Base64.Decoder; |
| #include <array> | |
| #include <vector> | |
| #include <iostream> | |
| template<typename T> | |
| void print(const T &input, bool with_newline = true) { | |
| for (auto it = input.begin(); it != input.end(); ++it) { | |
| if (std::next(it) == input.end()) { | |
| std::cout << *it; | |
| } |
| #include <array> | |
| #include <vector> | |
| #include <iostream> | |
| template<typename T> | |
| void print(const T &input, bool with_newline = true) { | |
| for (auto it = input.begin(); it != input.end(); ++it) { | |
| if (std::next(it) == input.end()) { | |
| std::cout << *it; | |
| } |
| #include <array> | |
| #include <vector> | |
| #include <iostream> | |
| template<typename T> | |
| void print(const T &input, bool with_newline = true) { | |
| for (auto it = input.begin(); it != input.end(); ++it) { | |
| if (std::next(it) == input.end()) { | |
| std::cout << *it; | |
| } |
gcloud logging read to pull logsruby json2csv.rb
goaccess to generate html output
| require "sidekiq/worker" | |
| ## | |
| # 因為 Sidekiq::Worker 預設執行 perform,所以此 module 可以讓我們指定 sidekiq 要 | |
| # 執行的函示 | |
| # | |
| # class Foo | |
| # include SimpleWorker | |
| # | |
| # simple_worker_performer :bar |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
| private void encodeDecodeVideo() { | |
| int width = 328, height = 248; | |
| int bitRate = 1000000; | |
| int frameRate = 15; | |
| String mimeType = "video/avc"; | |
| int threshold = 50; | |
| int maxerror = 50; | |
| MediaCodec encoder, decoder = null; | |
| ByteBuffer[] encoderInputBuffers; |