Skip to content

Instantly share code, notes, and snippets.

//
// 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
@founddrama
founddrama / VersionComparator.groovy
Last active April 20, 2023 12:55
a version comparator (e.g., "1.0.2" < "1.0.10")
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())) {
@technolize
technolize / model_zootool.js
Created May 15, 2011 06:40
Taberareloo から Zootool に投稿するやつ
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);
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/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
#
@teppeis
teppeis / tenkaichi-git.md
Last active April 29, 2023 14:58
天下一gitconfig大会

天下一gitconfig大会(サイボウズ社内git勉強会@2012/11/20)の@teppeisの資料です。

ぎっとぎとにしてやんよ

DojoCat

  • gistでmarkdown書いたらbookmarkletでプレゼンになるよ。
@saitamanodoruji
saitamanodoruji / tombloo.service.extractor.quote.hatebu.js
Last active October 13, 2015 22:08
はてブのコメントを簡単に Quote する Tombloo パッチ
// 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){
@11xor6
11xor6 / install-cloud-init.sh
Last active December 12, 2015 07:28
Install cloud-init on RHEL or Centos 6 for use on AWS.
# We need the latest epel-release for a RHEL/Centos specific cloud-init
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# After this finishes you can build an AMI that will process the user data
# with cloud-init. You may also be interested in taking a look at the config
# file at /etc/cloud/cloud.cfg
yum install cloud-init
@syoichi
syoichi / taberareloo_code_reading.md
Last active December 18, 2015 14:19
Taberarelooのコードを読み、処理の流れを追う

私はTaberarelooのコードの全てを読んだ事はないので正確さに欠けますが書いてみます(ファイル名などはこのディレクトリより)。

polygon_planetさんのTomblooに関する意見と同じような意見ですが、まず、特定のサービスに関するExtractor(extractors.js)やModel(models.js)から読んでみるというのはどうでしょうか。これらの分野はUser Scriptなどと異なりTaberarelooの基本的な処理を構成する一部分なので何かと想像しやすいかもしれません(もちろんTaberarelooの処理の中心となるbackground.jsやcontent.jsから見ていくのも良いと思います)。 例として、私が関わった事があるものを挙げると、ExtractorについてはYouTube、ModelについてはGistが小さくてわかりやすいかもしれません。この単位であれば、パッチで実現できる規模でもある為、YungSangさんのパッチを読むというのも良いかもしれません。

正直言ってTumblrのExtractorとModelはもともと大きかったものが私のせいで複雑なものとなってしまっているので読むのはお勧めできません…。

読む際はChromeのデベロッパーツールでブレークポ

@antichris
antichris / about.md
Created October 21, 2013 14:55
Fork your own Gist

Fork your own Gist

This is a bookmarklet that adds a fully functional Fork button to your own Gist.

If a Fork button is already present in the page, this bookmarklet will set focus to it instead of adding another one.

The change is temporary and the button will disappear as soon as you navigate away from that Gist (clicking the Fork button does this for you as well).


@taizooo
taizooo / patch.check.wedata.tbrl.js
Last active December 28, 2015 09:39 — forked from YungSang/patch.check.wedata.tbrl.js
Taberareloo パッチ: wedata.net を3時間毎にチェックして Wedata.net is still down だったら "ハロー wedata.net ハロー、ハロー" してくれるやつ 改
// ==Taberareloo==
// {
// "name" : "Check availability of wedata.net and Tweet"
// , "description" : "Check availability of wedata.net every 3 hours and tweet it"
// , "include" : ["background"]
// , "version" : "0.3.1.4"
// , "downloadURL" : "https://gist.github.com/taizooo/7480615/raw/patch.check.wedata.tbrl.js"
// }
// ==/Taberareloo==