運転が上手い人は、頭の中に「上空10mくらいから見下ろした自分と周辺のイメージ」が映っている。
自分の3台以上前の車から自分の3台以上後ろの車まで動きを把握している。
自分の目の前の信号機から2つ以上先の信号機を見て、前方の車がいつブレーキを踏むか想像できる。
縦列駐車や車庫入れでも「10m上空から見た姿勢」が基準で、その場合は前輪の傾き角度がボデイを透けて見えている。サイドミラーは確認の為に見ているだけ。
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
#!/usr/bin/env ruby | |
require 'date' | |
HDD_PATH = '/Volumes/HFS_disks_from_japan/mushu_avs' | |
while true do | |
d = DateTime.now | |
status = `drutil status` | |
if status =~ /^\s+Type: [-A-Z]+\s+Name: (.+)$/ |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import json | |
import urllib | |
import urllib2 | |
token = 'xoxp-xxxxxxxx-xxxxxxxx-xxxxxxx-xxxxxx' | |
bot_name = 'gunyabot' | |
class SlackClient: |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import json | |
import urllib | |
import urllib2 | |
import codecs | |
import time | |
from bs4 import BeautifulSoup | |
token = 'xoxp-xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxx' |
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
def decode_Vigenere(keyword, source) | |
s = 'KRYPTOSABCDEFGHIJLMNQUVWXZ' | |
t = [] | |
keyword.each_char {|c| | |
i = s.index(c) | |
t << s[i..-1] + s[0...i] | |
} | |
r = [] | |
d = 0 | |
source.each_char.with_index {|c, i| |
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
PROJECT(hello) | |
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) | |
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeModules) | |
SET(PROJECT_BINARY_DIR build) | |
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin) | |
SET(CMAKE_C_FLAGS "-std=c99 -Wall") | |
IF(APPLE) | |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -framework Foundation") |
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
#include <stdio.h> | |
#define A(s) puts(s ## s); | |
int main(int argc, char *argv[]) { | |
A("a"); | |
puts("a" "a"); | |
return 0; | |
} |
How to replace text nodes in HTML to HTML nodes like the question in stackoverflow: “jQuery way” to replace just a text node with a mix of HTML and text?
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
#インターネットショートカットファイル(*.url)からファイルを取り出して、これを取得しファイルにセーブする。 | |
import os | |
import glob | |
import urllib2 | |
from urlparse import urlparse | |
import ConfigParser | |
for file in glob.glob('*.url'): | |
try: |
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
tasuku@svn:~/groonga$ make coverage | |
lcov --compat-libtool --zerocounters --directory . \ | |
--output-file coverage.info | |
Deleting all .da files in . and subdirectories | |
Done. | |
Making check in lib | |
make[1]: ディレクトリ `/home/tasuku/groonga/lib' に入ります | |
make[1]: `check' に対して行うべき事はありません. | |
make[1]: ディレクトリ `/home/tasuku/groonga/lib' から出ます | |
Making check in src |
OlderNewer