天下一gitconfig大会(サイボウズ社内git勉強会@2012/11/20)の@teppeisの資料です。
- gistでmarkdown書いたらbookmarkletでプレゼンになるよ。
| // http://b.hatena.ne.jp/entry/{url} で動作する. | |
| // 範囲選択せずにコメント上でコンテクストメニューを開けば全文 Quote. | |
| // 範囲選択するとそこだけ Quote. | |
| // 本文の先頭にはてな ID が入り permalink にアンカーされる. | |
| // タグ, 日付は省略. | |
| Tombloo.Service.extractors.register( | |
| { | |
| name: 'Quote - Hatena Bookmark', | |
| RE: /^http:\/\/b\.hatena\.ne\.jp\/entry\//, | |
| check: function(ctx){ |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| Models.register({ | |
| name: 'Zootool', | |
| ICON: 'http://zootool.com/favicon.ico', | |
| LINK: 'http://zootool.com/', | |
| getCurrentUser : function(defaultUser) { | |
| if (defaultUser) { | |
| return succeed(defaultUser); | |
| } else if(this.currentUser) { | |
| return succeed(this.currentUser); |
| def versions = [] | |
| def f = new File('mock-version-tags.txt') | |
| f.eachLine { versions << it } | |
| def versionComparator = { a, b -> | |
| def VALID_TOKENS = /._/ | |
| a = a.tokenize(VALID_TOKENS) | |
| b = b.tokenize(VALID_TOKENS) | |
| for (i in 0..<Math.max(a.size(), b.size())) { |
| // | |
| // Copyright (c) KUMAGAI Kentaro ku0522a*gmail.com | |
| // All rights reserved. | |
| // | |
| // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
| // | |
| // | |
| // 1. Redistributions of source code must retain the above copyright | |
| // notice, this list of conditions and the following disclaimer. | |
| // 2. Redistributions in binary form must reproduce the above copyright |