query: tag:gist

Gist
はちょっとしたコードの切れ端を貼付けておくのに便利です。
先日紹介したEndless RubyのコードもGist上でのみ公開されていました。
Gemを作るまでもないコードをGistに貼付けて、そのままrequireして使えると便利そうだと思ったので、試してみました。

ruby>>
module Gist
module_function
def require(id, sha1 = "HEAD")
Kernel.require "open-uri"
gist = "http://gist.github.com"
eval(if sha1 == "HEAD"
open("#{gist}/#{id}.txt").read
else
Kernel.require "tmpdir"
cache = File.join(Dir.tmpdir, "gist-#{id}-#{sha1}")
if File.exist?(cache)
open(cache).read
else
open("#{gist}/raw/#{id}/#{sha1}") do |i|
code = i.read
open(cache, "w"){|o| o.write code}
code
end
end
end)
end
end

Gist.require("148479", "a59ea9ec3e865bafd1e4413b43b6ccb7a38d76fc")
#=> Hello, world!
<<--

Hash値で内容の変更が検出可能なので、md5のチェックサムを信用している人にとっては同程度の安全性で利用できそうです。

posted by genki genki on Thu 16 Jul 2009 at 16:57 with 0 comments
Today, I added the feature mentioned in the title above to [the Gist Ubiquitifier](http://ubiquity.s21g.com/).
Gist Ubiquitifier
Uploaded with plasq's Skitch!
Obviously, it lacks title of the commands. This spec came from our purpose of providing transparent service to make pages for installing ubiquity commands. But it might be provided in the future.
posted by takiuchi takiuchi on Tue 16 Sep 2008 at 21:36 with 0 comments

Gist
がUbiquityコマンドのインストールに対応してくれたので、
Gist Ubiquitiferの役目は終わったかなと思ったのですが、
ダウンロード数やPV、Ratingなんかがわかると嬉しいかもしれない、ということで、ちょっとだけ機能追加してみました。

Sample Page

GistもそこまでUbiquity専用に機能追加するとも思えないので、
Ubiquity専用サービスである利点を生かしてみました。

そのうち評判が高い順のリストを表示するようにしようかと思います。

posted by genki genki on Mon 8 Sep 2008 at 09:59 with 0 comments

Gist Ubiquitifierは、
Ubiquityコマンドを配布するためのサーバが無くても、
気軽にUbiquityコマンドを配布できるようにするためのサービスです。

このたび、拡張パラメータを指定することによって、
コマンドのインストールページをカスタマイズできるようになりました。

例えば、以下のように、QueryStringにパラメータを指定します。

http://ubiquity.s21g.com/7630?name=s21g-blog-search&Author=Genki+Takiuchi&Home+Page=http://blog.s21g.com/genki

name以外のパラメータは、インストールページ上で
表示されるだけで、実際のインストールの動作には影響しません。

posted by genki genki on Sun 7 Sep 2008 at 07:33 with 0 comments

やっつけで作ってみました。

Gist Ubiquitifier

Gist上のJavaScriptコードをUbiquityコマンド化してインストール可能にするサービスです。これを利用することで、Ubiquityコマンドインストール用のHTMLファイルを設置するサーバを持っていない場合でも、
コマンドを公開することができます。

USAGE:

まずは、Gist上でUbiquityコマンドをJavaScriptで登録します。
例えば、Gist上のURIが

http://gist.github.com/7630

の場合、

http://ubiquity.s21g.com/7630

がインストールページなります。
コマンド名は、nameパラメータで指定できます。

http://ubiquity.s21g.com/7630?name=s21g-blog-search

使えそうであれば、もうちょっとちゃんとしたデザインにしようと思います。

posted by genki genki on Thu 28 Aug 2008 at 13:40 with 0 comments
Contents rssrss
Leading Smart TV App Development Companies | USA | 4 Way Technologies
Apple TV Developer | TVOS Development | USA | 4 Way Technologies
光ファイバーを二次元振動させて走査するAR用ディスプレイ
因果の取り違え
Value Transformer
Swift2's defer for CoffeeScript
mongodb-3.0からcreateIndexのdropDupsが無くなったらしい
mongodb-3.0以降のWiredTigerの設定を動的に変更する方法
一般楕円の高速生成アルゴリズムへの道標
farro mantecatoのレシピ
Tags
gist
Comments rssrss
http://ldm.sakura.ne.jp/balu+bbbs/album/album.cgi?mode=detail&no=210 http://ldm.sakura.ne.jp/balu+bbbs/album/album.cgi?mode=detail&no=210: Aw, this was an incredibly good post. Taking the t... 04/25 18:19
https://www.bigbeargum.com/2019/02/15/ambrose-redmoon/ https://www.bigbeargum.com/2019/02/15/ambrose-redmoon/: Hello would you mind letting me know which hosting... 04/25 17:39
http://zeroken.jp/1978td/album/album.cgi?mode=detail&no=20 http://zeroken.jp/1978td/album/album.cgi?mode=detail&no=20: Asking questions are genuinely fastidious thing if... 04/25 17:26
https://natucci-estetica.com/?attachment_id=1376 https://natucci-estetica.com/?attachment_id=1376: Hello there, You have done a fantastic job. I wi... 04/25 17:05
https://www.waimaoz.com/23019.html?unapproved=5151&moderation-hash=a14b2a811444fc3059edb7c1441d076e https://www.waimaoz.com/23019.html?unapproved=5151&moderation-hash=a14b2a811444fc3059edb7c1441d076e: Good day! Do you use Twitter? I'd like to follow y... 04/25 16:50
https://bysystem.ru/process-proizvodstva-kartonnyh-korobok-i/ https://bysystem.ru/process-proizvodstva-kartonnyh-korobok-i/: Требовалось производство картонных коробок в сжа... 04/25 15:33
https://marialionsa.ru/proizvodstvo-kartonnyh-korobok-i-upakovki/ https://marialionsa.ru/proizvodstvo-kartonnyh-korobok-i-upakovki/: Документооборот четкий, все закрывающие акты предо... 04/25 15:05
https://example.com/oqaphq https://example.com/oqaphq: This post is genuinely a pleasant one it assists n... 04/25 12:43