- python:
python -m SimpleHTTPServer 5000
- perl:
plackup -MPlack::App::Directory -e 'Plack::App::Directory->new(root => ".")->to_app
- ruby:
ruby -rwebrick -e 'WEBrick::HTTPServer.new(:Port => 5000, :DocumentRoot => ".").start'
- php:
php -S 0.0.0.0:5000
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
node -e 'var fs=require("fs"), path = require("path"); require("http").createServer(function(req, res){ url = path.join(__dirname, req.url); res.end(fs.readFileSync(url.replace(/\/$/, "/index.html"), "utf8"))}).listen(8000)' |
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
<html> | |
<body> | |
<style> | |
#content, #case { | |
margin: 20px 20px; | |
height: 100px; | |
width: 600px; | |
display: block; | |
background: cyan; | |
} |
deferred化しました
使い方は次のようになります
dLevel = require "dLevel"
db = dLevel("./mydb")
db.set("name", "dLevel")
.then(()->
db.get("name")
# mkdir -p /usr/local/lib/go
# export GOPATH=/usr/local/lib/go
# export GOBIN=$GOPATH/bin
# apt-get update
# apt-get install docker.io
# ln -sf /usr/bin/docker.io /usr/local/bin/docker
# sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/docker.io
# apt-get install git mercurial bzr gcc
# go get [email protected]:drone/drone.git
こんなんなる
% mocha -R spec test/test-basepath.js
Stubcell server should set json basepath
request
1) should return test/base/test/record_get.json
2) "after each" hook
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
"use strict"; | |
(function(){ | |
var express = require("express"); | |
var mysql = require("mysql"); | |
// some process | |
var hoge = 1; | |
var fugafuga = 2; |
やりたいこと
- 親側の変更を子のComponentに伝えたい
- 子にどうやって渡したらいいのかわからな
- イベント/ハンドラもどうやって渡せばいいのか
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
# https://tools.ietf.org/html/rfc7231#section-6.1 | |
alias "100"="echo 'Continue'" | |
alias "101"="echo 'Switching Protocols'" | |
alias "200"="echo 'OK'" | |
alias "201"="echo 'Created'" | |
alias "202"="echo 'Accepted'" | |
alias "203"="echo 'Non-Authoritative Information'" | |
alias "204"="echo 'No Content'" | |
alias "205"="echo 'Reset Content'" | |
alias "206"="echo 'Partial Content'" |
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
#!/bin/bash | |
function kubectx(){ | |
CTX=$(kubectl config get-contexts | awk 'NR>1 {print $2}' | peco) | |
if [ x${CTX} != "x" ]; then | |
kubectl config set current-context $CTX; | |
fi | |
} | |
kubectx |
OlderNewer