Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

MISAWA Yoshihiro PyYoshi

🏠
Working from home
Block or report user

Report or block PyYoshi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View build_ffmpeg_for_mingw64.sh
mkdir -p ~/src
cd ~/src
wget https://www.libsdl.org/release/SDL-1.2.15.tar.gz
tar zxvf SDL-1.2.15.tar.gz
cd ~/src/SDL-1.2.15
./configure --prefix=/mingw64 --disable-stdio-redirect
make -j4
make install
@PyYoshi
PyYoshi / WORKSPACE
Created Feb 27, 2017
bazel build docker-alpinelinux 3.5
View WORKSPACE
# AlpineLinux 3.5
new_http_archive(
name = "docker_alpinelinux",
url = "https://nl.alpinelinux.org/alpine/v3.5/releases/x86_64/alpine-minirootfs-3.5.1-x86_64.tar.gz",
build_file = "alpinelinux.BUILD",
sha256 = "fa17f25ded0b29d94d8cc2d9aabb6f737f4b987c42fe8a6d11e05cfe2c52a64c",
)
@PyYoshi
PyYoshi / main.go
Last active Jan 28, 2017
KotoEncoderからダンプするやつ
View main.go
package main
import (
"bufio"
"bytes"
"flag"
"fmt"
"io/ioutil"
"log"
"net"
@PyYoshi
PyYoshi / _.sh
Last active Jan 25, 2017
Ubuntu16.04をインストールした後にすること
View _.sh
# VirtualBoxを利用する場合は3Dアクセラレーションを無効を推奨
sudo add-apt-repository ppa:webupd8team/java
sudo add-apt-repository ppa:webupd8team/atom
sudo add-apt-repository ppa:nginx/stable
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo bash -c "echo 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' > /etc/apt/sources.list.d/docker.list"
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
View _.md
$ go version
$ go test -bench . -benchmem
go version go1.7 linux/amd64

BenchmarkA1-4   	2000000000	         0.29 ns/op	       0 B/op	       0 allocs/op
BenchmarkA2-4   	2000000000	         0.27 ns/op	       0 B/op	       0 allocs/op
View strbench_test.go
package strbench
// Results
// // i7-4650U CPU @ 1.70GHz
//
// go version go1.6.2 darwin/amd64
// BenchmarkAppendStr-4 30000000 41.0 ns/op 0 B/op 0 allocs/op
// BenchmarkFmtFormat-4 5000000 383 ns/op 24 B/op 2 allocs/op
// BenchmarkConcat1-4 5000000 280 ns/op 64 B/op 2 allocs/op
// BenchmarkConcat2-4 3000000 395 ns/op 116 B/op 4 allocs/op
View babeled.js
function sleep() {
var ms = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0];
return new Promise(
function (r) {
return setTimeout(r, ms);
}
);
}
var writeTransactionCreateCarAndPerson3 = function writeTransactionCreateCarAndPerson3() {
@PyYoshi
PyYoshi / _.md
Last active Apr 2, 2016
JenkinsでDockerコンテナのビルド
View _.md

git pluginで該当リポジトリを取得

ビルド手順でシェルを選んでbuild.shの中身をコピペ

保存

memo

予めdocker-machineでdefault vmを作っておく

@PyYoshi
PyYoshi / realmjs-flowtype-interface.js
Last active Nov 28, 2016
flowtype interface for realm-js
View realmjs-flowtype-interface.js
declare class RealmResults {
length:number;
filtered(query:string, arg:?any):RealmResults;
snapshot():RealmResults;
sorted(descriptor:any, reverse:?boolean):RealmResults;
}
declare class RealmList {
length:number;
filtered(query:string, arg:?any):RealmResults;
@PyYoshi
PyYoshi / usbhubs.md
Last active Feb 4, 2016
V919 Air CH
View usbhubs.md
You can’t perform that action at this time.