Skip to content

Instantly share code, notes, and snippets.

View yuta1723's full-sized avatar

yuta naito yuta1723

View GitHub Profile
@yuta1723
yuta1723 / commands.md
Last active October 18, 2019 16:46
コマンドメモ

検索

特定のファイル名の検索

find [検索対象フォルダのパス] -type f -name "*[検索したい文字列]*"

ファイルの中に 「xxx」という文字が入っているファイルの検索

grep xxx -rl [検索対象フォルダのパス]

容量の確認

1.ツナ缶の油を使ってツナを軽く炒める。(中火)
2.もやしを入れて炒める。(中火)
3.ある程度もやしがしなびてきたら、卵を入れて炒める。(弱火)
4.ポン酢を入れてさっと炒める。(弱火)
# -*- coding: utf-8 -*-
from wsgiref import simple_server
from cgi import parse_qs
import calendar
def application(env, res):
status = "200 OK"
get_info = parse_qs(env['QUERY_STRING'])
year = get_info['year'][0]
month = get_info['month'][0]
# -*- coding: utf-8 -*-
from wsgiref import simple_server
def application(env, res):
status = "200 OK"
body = makeString()
header = [("Content-type", "text/html;charset=UTF-8"),("Content-Length",str(len(body)))]
res(status,header)
return [body]
from wsgiref import simple_server
def application(env, res):
status = "200 OK"
header = [("Content-type", "text/plain")]
res(status,header)
return ["Hello wsgi application\n"]
if __name__ == "__main__":
sv = simple_server.make_server("", 8080, application) #host , port , application
foo = "a"
print type(foo) #<type 'str'>
if isinstance(foo,str):
print 'a' # ->a
foo = 'abc'
if type(foo) is 'str':
print 'str'
@yuta1723
yuta1723 / dust1
Last active October 13, 2015 17:43
foo = 'abc'
print type(foo) # <type 'str'>
print type(type(foo)) # <type 'type'>