This file contains hidden or 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
FROM ubuntu:xenial | |
RUN apt-get update && apt-get install -y wget libgmp-dev && \ | |
wget https://s3-ap-southeast-2.amazonaws.com/protobuf-solidity/packages/debian/solpb-0.5.0-linux-x86_64.deb && \ | |
dpkg -i solpb-0.5.0-linux-x86_64.deb && \ | |
rm -rf /var/lib/apt/lists/* | |
This file contains hidden or 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
cv.wait***から抜けたあと、この関数に渡していたunique_lockはlockされているが、これはwakeupと不可分に起きるわけではない。 | |
例えば他のスレッドが対応するmutexをロックするようなコードを実行していると、以下のようなフローが発生しうる | |
cv.notifyXXX 呼び出し => cv.waitXXX が再開 => __cv.waitXXXに渡されていたlockを他のスレッドが取得 => cv.waitXXXの中で、再開されたスレッドがlockを取得 | |
したがって以下のようなコードでXが完了するまでYが実行されないことを保証することはできない | |
{ | |
unique_lock lock(mutex); | |
cv.wait(lock, predicate); | |
//X | |
} |
This file contains hidden or 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
package ns; | |
service Hoge { | |
rpc Foo(FooReq) returns (FooRep) {} | |
rpc Bar(BarReq) returns (BarRep) {} | |
} | |
| | |
V | |
#### client |
This file contains hidden or 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
11/13 | |
300 client/13 byte records, 1 server process, 1 client process | |
dokyougemusu-no-MacBook-Pro:naquid iyatomi$ ./test/e2e/client/build/client | |
process 140841 requests average 1.707306 sec | |
dokyougemusu-no-MacBook-Pro:naquid iyatomi$ ./test/e2e/client/build/client | |
process 150644 requests average 1.564081 sec | |
dokyougemusu-no-MacBook-Pro:naquid iyatomi$ ./test/e2e/client/build/client | |
process 146526 requests average 1.580449 sec | |
dokyougemusu-no-MacBook-Pro:naquid iyatomi$ ./test/e2e/client/build/client |
This file contains hidden or 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
find $SEARCH_DIR -name "$FILE_PATTERN" -exec sh -c 'echo mv "$1" "$(echo "$1" | sed s/$PATTERN/$REPLACE/)"' _ {} \; | |
複数引数の例 | |
for i in {2..12} ; do | |
find . -name "food[1-6].png" -exec sh -c 'cp "$1" "$(echo "$1" | sed s#food#$2/food_$2_#)"' _ {} $i \; | |
done |
This file contains hidden or 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
J / K = Entropy | |
S1, S2 .. have same Entropy | |
K1 > K2 <=> J1 > J2 | |
J => 保存される(第1法則) | |
E => 増大する(第2法則) | |
K => 減りつづけるということ | |
This file contains hidden or 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
#### tl;dr | |
例えばapiserverなら | |
``` | |
sudo bash -c "GOPATH=/var/src/apiserver:/master-release/src/go/Godeps/_workspace/ go build -ldflags '-X github.com/GoogleCloudPlatform/kubernetes/pkg/version.gitCommit 431caa93dfdbe86e14c8041e64ba10bcc80a7b40 -X github.com/GoogleCloudPlatform/kubernetes/pkg/version.gitTreeState dirty -X github.com/GoogleCloudPlatform/kubernetes/pkg/version.gitVersion v0.3-111-g431caa93dfdbe8-dirty -X github.com/GoogleCloudPlatform/kubernetes/pkg/version.gitMajor 0 -X github.com/GoogleCloudPlatform/kubernetes/pkg/version.gitMinor 3+' github.com/GoogleCloudPlatform/kubernetes/cmd/apiserver" | |
``` | |
でリビルドできる。 | |
#### 背景 | |
kubernetesを使っているとまだ、ちょっとしたバグを修正したいときがあるのですが、 |
This file contains hidden or 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
### settings that cause trouble if you leave them default | |
- VPC | |
- DNS hostname => set to yes | |
- VPC subnet | |
- auto-assign public ip => set to yes | |
- VPC route table | |
- create internet gateway and attach it to route table. otherwise no one can connect instance which has this VPC |
This file contains hidden or 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
dokyougemusu-no-MacBook-Pro:mono iyatomi$ sudo make install | |
Password: | |
Sorry, try again. | |
Password: | |
Sorry, try again. | |
Password: | |
Making install in po | |
Making install in mcs | |
if test "mono" = "gettext-tools"; then \ | |
../.././install-sh -c -d /usr/local/share/gettext/po; \ |
This file contains hidden or 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
MachineId:8D9D94EBA24784C622132CA54BB54571 | |
EpicAccountId:867f7c487d6b4555a177a07a11527560 | |
SEGV_MAPERR at 0x3 | |
FGenericPlatformMisc::RaiseException(unsigned int) Address = 0x109fc3dab (filename not found) [in UE4Editor-Core.dylib] | |
FOutputDeviceMacError::Serialize(wchar_t const*, ELogVerbosity::Type, FName const&) Address = 0x10a17c378 (filename not found) [in UE4Editor-Core.dylib] | |
FOutputDevice::Logf(wchar_t const*, ...) Address = 0x10a259d17 (filename not found) [in UE4Editor-Core.dylib] | |
FDebug::AssertFailed(char const*, char const*, int, wchar_t const*, ...) Address = 0x10a1d8b7e (filename not found) [in UE4Editor-Core.dylib] | |
__31-[FCocoaTextView selectedRange]_block_invoke Address = 0x10a108b1f (filename not found) [in UE4Editor-Core.dylib] |