- スペースではなくタブを使う。
- ファイルの終端は改行を入れる。
- 論理的なまとまりにコードを分割するための改行は自由に使って良い。
- 末尾に空白を入れない。
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/osascript | |
on run argv | |
set cmd to "cd" & " \"" & (do shell script "pwd") & "\"" | |
tell application "iTerm" | |
activate | |
tell current window | |
set firstTab to current tab | |
tell current session of current tab | |
write text cmd |
- 全てキャメルケースで記述する。
- モジュールスコープの定数とクラスは開始文字 uppercase.
- 関数と変数は開始文字 lowercase.
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
# Description: | |
# Get restaurant data from Gurunavi API | |
# | |
# Commands: | |
# hubot harahe - Reply with restaurant info | |
Client = require("node-rest-client").Client | |
client = new Client() | |
parseString = require('xml2js').parseString |
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
String.prototype.capitalize = function() { | |
return this.toString().toLowerCase().replace(/\b[a-z]/g, function(letter) { | |
return letter.toUpperCase(); | |
}) | |
} |
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
check_css = lambda { |env| | |
node = env[:node] | |
node_name = env[:node_name] | |
# Don't continue if this node is already whitelisted or is not an element. | |
return if env[:is_whitelisted] || !node.element? | |
parent = node.parent | |
return unless node_name == 'style' || node['style'] | |
if node_name == 'style' | |
unless good_css? node.content | |
node.unlink |
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
<!DOCTYPE HTML> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>dynamic-keyframe-anim-sanple</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script> | |
$(document).ready(function() { | |
(function() { | |
var anim_number = 1; |
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/python | |
# -*- coding:utf8 -*- | |
import socket, ssl | |
network = '' #host | |
port = 6668 | |
# 以下変数を編集して使ってください -------------------------------------------# |
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
/** | |
* MyDelegateClass.h | |
*/ | |
#import <Foundation/Foundation.h> | |
@protocol MyDelegate; | |
@interface MyDelegateClass : NSObject { | |
id <MyDelegate>_delegate; | |
} |
NewerOlder