Skip to content

Instantly share code, notes, and snippets.

@k-motoyan
k-motoyan / table.md
Last active May 17, 2024 13:12
フリーザ相性早見表
対面 相性(◎勝てる ◯有利 △不利 ✕無理)
ドラパルト(ネイティオ)
ルギア
ミライドン
リザードン
ライコポン
ロストギラティナ
ロストバレット
サーナイト
@k-motoyan
k-motoyan / Main.elm
Created December 16, 2018 10:48
Elm <-> Swift
port module Main exposing (..)
import Browser
import Html exposing (Html, button, div, text)
import Html.Events exposing (onClick)
type alias Model = Int
main =
Browser.element
@k-motoyan
k-motoyan / static-di.swift
Created July 19, 2017 03:21
Static Dependency injection for Swift.
import Foundation
protocol Logger {
func write(_ message: String)
}
final class SystemLogger: Logger {
func write(_ message: String) {
print("System: " + message)
}
@k-motoyan
k-motoyan / sample.swift
Created February 3, 2017 14:40
ジェネリクスを使ってDelegateの振る舞いを変更する
// Delegate用Protocol
protocol RequestDelegate : class {
func begin()
func done()
}
// APIリクエストクラス
class Request {
weak var delegate: RequestDelegate?
@k-motoyan
k-motoyan / Qiita-AdventCalender2016-転職.md
Last active December 28, 2016 11:06
子供が生まれるにあたって転職について考えた事

子供が生まれるにあたって転職について考えた事

これは 転職 Advent Calendar 2016 - Qiita の9日目の投稿です。


子供、可愛いですよね。

子供が産まれるまでは正直うるさいだけと思っていて苦手だったのですが、いざ自分に子供が生まれてみると、どんなにうるさくても、鼻水を服に擦りつけてきても、技術書を破ったり落書きして遊んでいても、書いたコードを保存する前にPCの電源ボタンを押されて作業が飛んでしまっても__可愛いから許す!!__と思えてしまうぐらい、まぁ、とにかく可愛い。

@k-motoyan
k-motoyan / server.php
Created November 22, 2015 15:41
PHP standalone application server.
<?php
$server = stream_socket_server(
'tcp://127.0.0.1:8080',
$error_no,
$error_str,
STREAM_SERVER_LISTEN | STREAM_SERVER_BIND,
stream_context_create([
'socket' => [
'backlog' => 1024
@k-motoyan
k-motoyan / app.css
Last active August 29, 2015 14:10
milkcocoa使ってみたサンプル http://human-skill-lv1.org/entry/2014/12/02/
@font-face {
font-family: "uzura";
src: url(../fonts/uzura.ttf) format("truetype");
}
@font-face {
font-family: "ohisama";
src: url(../fonts/OhisamaFont11.ttf) format("truetype");
}
@k-motoyan
k-motoyan / Vagrantfile::zephir
Last active August 29, 2015 13:56
zephir provisioning from vagrant
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
config.vm.network :public_network
config.vm.provision :shell, :inline => <<-SHELL
sudo apt-get -y update
sudo apt-get -y install git gcc make re2c php5 php5-dev libpcre3-dev
git clone https://github.com/json-c/json-c.git
@k-motoyan
k-motoyan / phalcon_setup.sh
Last active December 21, 2015 05:59
centos用にphalconの動作環境をセットアップしてくれるスクリプト
#!/bin/bash
GIT_VERSION=1.8.4
PHP_VERSION=5.5.3
# epel and remi repository install
rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
cd /usr/local/src
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
@k-motoyan
k-motoyan / eccube_install.sh
Last active December 16, 2015 13:19
EC-CUBEインストールスクリプト:LAMP環境の構築とEC-CUBEのインストールを自動で行なってくれるスクリプトです。
#!/bin/bash
###########################################
# EC-CUBE INSTALL SHELL
# target: centOS6.* x86_64
###########################################
# add remi repository
rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi
cd /usr/local/src