This file contains hidden or 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
// map自体は、.NETでは.select拡張メソッドとして提供されているかんじっぽい? | |
// old | |
static int[] | |
squarefunc(int[] lis) | |
{ | |
for(var i = 0; i <= lis.Count() -1; ++i) | |
{ | |
lis[i] = lis[i] * lis[i]; | |
} |
This file contains hidden or 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 | |
# -*- coding: utf-8 -*- | |
import sys | |
import json | |
import urllib2 | |
from datetime import * | |
_MONTH = {u'Jan':u'01', u'Feb':u'02', u'Mar':u'03', u'Apr':u'04', | |
u'May':u'05', u'Jun':u'06', u'Jul':u'07', u'Aug':u'08', |
This file contains hidden or 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
# vim: fileencoding=utf-8 | |
def main(): | |
print 'gist!' | |
if __name__ == '__main__': | |
main() |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<header> | |
<h1>Table sum up calculation test</h1> | |
</header> |
This file contains hidden or 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
Imports System.Runtime.CompilerServices | |
''' <summary> エイリアス的な拡張メソッドたち </summary> | |
Module StringExtention | |
''' <summary> </summary> | |
<Extension()> _ | |
Public Function setFormat(this As String, ParamArray values As String()) As String | |
Return String.Format(this, values) | |
End Function |
This file contains hidden or 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
Imports System.Runtime.CompilerServices | |
Module EnumUtils | |
<Extension()> _ | |
Public Function convertEnum(Of TEnum)(this As Integer) As TEnum | |
Dim t As TEnum | |
If Not t.GetType().IsEnum Then | |
Throw New ArgumentException("Enum型以外はダメですよん") | |
End If |
This file contains hidden or 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
# http://qiita.com/items/1f01aa09ccf148542f21 | |
gs() { | |
git status -sb | |
} | |
gst() { | |
git status -sb | head -n 1 | |
git status -sb | sed '1d' | grep --line-number '^' | |
} |
This file contains hidden or 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
// depend on twitterbootstrap's mixins.less | |
@import "mixins.less"; | |
.zurui-line-top(@op1: .1, @op2: 1) { | |
border-top: 1px solid rgba(0,0,0, @op1); | |
.box-shadow(0 1px 0 rgba(255,255,255,@op2) inset); | |
} | |
.zurui-line-left(@op1: .1, @op2: 1) { | |
border-left: 1px solid rgba(0,0,0, @op1); |
This file contains hidden or 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 | |
import sys | |
import appscript | |
def main(): | |
iterm_transparency = appscript.app('iTerm').current_terminal.current_session.transparency | |
iterm_transparency.set("0.9" if sys.argv[1] == '-' else "0.1") | |
if __name__ == '__main__': |
This file contains hidden or 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
" Vim syntax file | |
" Language : VisualBasic.NET | |
" Maintainers: OGURA Daiki | |
" Last Change: 2012 12 17 | |
if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif |
OlderNewer