Skip to content

Instantly share code, notes, and snippets.

View TakashiSasaki's full-sized avatar

Takashi SASAKI TakashiSasaki

View GitHub Profile
@TakashiSasaki
TakashiSasaki / .gitconfig
Created June 6, 2012 15:01
Git global settings in .gitconfig file on Windows.
[gui]
[user]
name = Takashi SASAKI
email = takashi316@gmail.com
[core]
whitespace = trailing-space,space-before-tab,indent-with-non-tab
autocrlf = true
repositoryformatversion = 0
filemode = false
@TakashiSasaki
TakashiSasaki / hello.txt
Created June 7, 2012 10:13
松重くん、佐々木です。
まず自分のアカウントでgithubにログインします。
gist というボタンをクリックするか、 http://gist.github.com/ にアクセスすると
自分専用のファイル貼り付けスペースが見えるはずです。
一番上の欄にファイルの簡単な説明を、
その下の欄にファイル名を記入します。
ファイルの内容を一番大きなこのボックスに貼り付けます。
「Create Public Gist」をクリックすると共有完了です。
そのURL( https://gist.github.com/gists/数字 )を教えて下さい。
また、 https://gist.github.com/アカウント名 で自分が貼りつけたファイルを閲覧することができます。
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union
@TakashiSasaki
TakashiSasaki / gist:3951766
Created October 25, 2012 10:02
Using WinMerge as a mergetool of git
# This file obsoletes http://pastebin.com/DUTrrYdv
[merge]
tool = WinMerge
[mergetool "WinMerge"]
path = C:/Program Files (x86)/WinMerge/WinMergeU.exe
cmd = \"C:/Program Files (x86)/WinMerge/WinMergeU.exe\" -dl \"$LOCAL\" -dm \"$BASE\" -dr \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$REMOTE\" -o \"$MERGED\"
[diff]
@TakashiSasaki
TakashiSasaki / gist:4282903
Created December 14, 2012 05:32
HTML5 StorageEvent does not fire "storage" event in the window that changes the state of the local storage. This sample shows how to fire self-"storage" event.
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<script>
"use strict";
@TakashiSasaki
TakashiSasaki / .hgrc
Created December 22, 2012 08:02
Mercurial (hg)を使うにあたって、まずはpurge extensionとconvert extensionは使えるようにしておかないと不便。
[extensions]
hgext.purge=
hgext.convert=
[ui]
username = Takashi SASAKI <takashi-sasaki@example.com>
class MyTest(unittest.TestCase):
def setUp(self):
unittest.TestCase.setUp(self)
try:
import webtest
except ImportError:
import setuptools.command.easy_install as easy_install
easy_install.main(["WebTest"])
exit()
<script src="https://gist.github.com/4524547.js"></script>
@TakashiSasaki
TakashiSasaki / git-status.txt
Created January 15, 2013 10:03
ISW12Hの設定画面で、HTCアプリのテンポラリファイルを全て削除するというのがある。 https://twitter.com/TakashiSasaki/status/290784605701824512/photo/1/large これで何が削除されるのかを知りたくて削除前の/mnt/sdcardをgitリポジトリに保存して削除後の状態でgit status取ってみた。 結果的には、HtcGreaderというフォルダの下のJPEG画像とDCIM/.thumbnailsの下のサムネイル画像が消されるだけだった。 なので安心して削除して良い。 https://twitter.com/TakashiSasaki/status/290784605701824512
# On branch master
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
#21deleted: .3DFlatten/82F0A94F-1816977.jpg
# deleted: .data/HtcGreader/-1271364895.jpg
# deleted: .data/HtcGreader/-1301349222.jpg
# deleted: .data/HtcGreader/-1484455093.jpg
# deleted: .data/HtcGreader/-1683847924.jpg
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div>カメラ画像!</div>
<input id="ip_address" value="192.168.0.5"/>
<div><img id="jpeg1" src=""/></div>
<script type="text/javascript">