-
-
Save cemo/9da01901cdac1738bfa3ae8688df8b31 to your computer and use it in GitHub Desktop.
Revisions
-
Takeshi Nishimatsu revised this gist
Aug 18, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -68,15 +68,15 @@ Gist用の`.gitignore`はローカルだけに置くことにする。 図: GFM文章の中に画像を挿入した例。ベトナムみやげのクマのぬいぐるみの写真。 ## ブログなどにGistの内容を貼り付ける ブログなどにGistの内容を貼り付けるには、Gistの最上部で**Embed**を選択して得られる <script src="https://gist.github.com/t-nissie/021f09aa327f02d0a710.js"></script> などを使う。たとえば https://gist.github.com/t-nissie/021f09aa327f02d0a710 を貼り付けてみると <script src="https://gist.github.com/t-nissie/021f09aa327f02d0a710.js"></script> となる。(Gistでは表示されない。手元で[gfm2html.rb](https://gist.github.com/t-nissie/c415b7da3a694e82d6b5 "gfm2html.rb")を使って変換したHTMLなら表示される。) ## Secret Gistとは Gistを作るとき、それをSecret Gistと指定することもできる。 -
Takeshi Nishimatsu revised this gist
Aug 18, 2016 . 1 changed file with 28 additions and 13 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -13,26 +13,26 @@ Tipsなどのコメントを乞う。 ## gitコマンドで手もとにcloneできる 例えば `git clone https://gist.github.com/9580883.git HowToGist` もしくは `git clone [email protected]:9580883.git HowToGist` とすれば`HowToGist/`というディレクトリが作られ、 その中に`HowToGist.md`などいくつかのファイルと`.git/`ディレクトリがcloneされる。 Gistのwebエディタ [Ace](http://ace.c9.io/ "Ace is an embeddable code editor written in JavaScript.") はまだ日本語の編集に少し難があるので、Gistの文章は手もとで編集してgit pushするのが便利である。 ## 1つのエントリーに複数のファイルを置くことができる 1つのエントリーには1つのディレクトリが割り当てられ、そこに複数のファイルを置くことができる。 複数のファイルの表示順序は現在はアルファベット順のようである。 (以前は [ASCIIbetical order](http://en.wikipedia.org/wiki/ASCIIbetical_order#Order "ASCIIbetical order") で [あった](http://stackoverflow.com/questions/17665267/how-do-you-control-the-order-in-which-files-appear-in-a-github-gist "stackoverflow")。) ## .gitignoreはローカルだけに置く Gistに`.gitignore`を置くと見せたいファイルよりアルファベット順でで前にきてしまって、 `.gitignore`が前面に出てきてしまう。 Gist用の`.gitignore`はローカルだけに置くことにする。 その場合`.gitignore`の中に`.gitignore`も書く。 例えば https://gist.github.com/t-nissie/9771048 のための`.gitignore`はこんなかんじ: *.dSYM *.log @@ -43,7 +43,7 @@ Gist用の.gitignoreはローカルだけに置くことにする。 .gitignore ## GitHub Flavored Markdown (GFM) で書かれたものはHTMLに変換されて表示される この`HowToGist.md`のように、 [GitHub Flavored Markdown (GFM)](https://help.github.com/articles/github-flavored-markdown "GFM") で書かれたファイルはHTMLに変換されて表示される。 意味のあるファイル名を持ったGFMファイルが先頭に置かれてうまくHTML表示されるには、 @@ -67,13 +67,28 @@ Gist用の.gitignoreはローカルだけに置くことにする。 図: GFM文章の中に画像を挿入した例。ベトナムみやげのクマのぬいぐるみの写真。 ## ブログなどにGistの内容を貼り付ける ブログなどにGistの内容を貼り付けるには、Gistの最上部で**Enbed**を選択して得られる <script src="https://gist.github.com/t-nissie/021f09aa327f02d0a710.js"></script> などを使う。たとえば https://gist.github.com/t-nissie/021f09aa327f02d0a710 を貼り付けてみると <script src="https://gist.github.com/t-nissie/021f09aa327f02d0a710.js"></script> となる。 ## Secret Gistとは Gistを作るとき、それをSecret Gistと指定することもできる。 Secret GistのURLを友人に送ればそのGist文書を友人間で共有できる。 Secret GistはGoogleなどのサーチエンジンの対象外にはなるが、 閲覧にパスワードが必要というわけではない。 Secret Gistは自分のGistのページで金色の枠が付いて表示される。 例えば、学術論文のLaTeXソースコードや図のPDFファイルをSecret Gistに置いて、 それらを共著者と共有すると便利である。 編集の履歴が残るので、論文の正当性の証明の1つとして使えるかもしれない。 ## GitHubにspammer/spammyと誤認されてしまったら あなたがあなたのGistにアクセスして "Whoops. We seem to have missed the gist of that gist you were looking for." -
Takeshi Nishimatsu revised this gist
Jan 4, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -61,6 +61,7 @@ Gist用の.gitignoreはローカルだけに置くことにする。 `git add vietnam.jpg`で後から画像を置くこともできる。 その画像は https://gist.github.com/t-nissie/9580883/raw/vietnam.jpg とgistのURLと画像のファイル名との間に`raw/`を挿入することで参照することができる。 2016年1月現在、この方法はJPEG, PNG, GIFファイルには有効だが、SVGファイルだとうまくいかない。  -
Takeshi Nishimatsu revised this gist
Jan 3, 2016 . 1 changed file with 5 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -58,14 +58,13 @@ Gist用の.gitignoreはローカルだけに置くことにする。 * [grip](https://github.com/joeyespo/grip "grip") ## 後から画像を置くこともできる `git add vietnam.jpg`で後から画像を置くこともできる。 その画像は https://gist.github.com/t-nissie/9580883/raw/vietnam.jpg とgistのURLと画像のファイル名との間に`raw/`を挿入することで参照することができる。  図: GFM文章の中に画像を挿入した例。ベトナムみやげのクマのぬいぐるみの写真。 ## Secret Gistとは Gistを作るとき、それをSecret Gistと指定することもできる。 -
Takeshi Nishimatsu revised this gist
Jul 27, 2015 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -67,8 +67,6 @@ Gist用の.gitignoreはローカルだけに置くことにする。 図: http://bl.ocks.org/ を使ってGFM文章の中に画像を挿入した例。ベトナムみやげのクマのぬいぐるみの写真。 ## Secret Gistとは Gistを作るとき、それをSecret Gistと指定することもできる。 Secret GistのURLを友人に送ればそのGist文書を友人間で共有できる。 -
Takeshi Nishimatsu revised this gist
Jul 27, 2015 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -63,8 +63,6 @@ Gist用の.gitignoreはローカルだけに置くことにする。 また、`git add vietnam.jpg`で後から画像を置くこともできる。 その画像は http://bl.ocks.org/ を使って http://bl.ocks.org/t-nissie/raw/9580883/vietnam.jpg と参照することができる。  図: http://bl.ocks.org/ を使ってGFM文章の中に画像を挿入した例。ベトナムみやげのクマのぬいぐるみの写真。 -
Takeshi Nishimatsu revised this gist
Jul 27, 2015 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -58,7 +58,9 @@ Gist用の.gitignoreはローカルだけに置くことにする。 * [grip](https://github.com/joeyespo/grip "grip") ## 後から画像を置くこともできる 画像ファイルをドラッグ・アンド・ドロップでGistにアップロードしたり、 `selecting them`をクリックしてアップロードすることもできる。 また、`git add vietnam.jpg`で後から画像を置くこともできる。 その画像は http://bl.ocks.org/ を使って http://bl.ocks.org/t-nissie/raw/9580883/vietnam.jpg と参照することができる。 また、2014年4月頃から githubusercontent により https://gist.github.com/t-nissie/9580883/raw/a0a29d07307d0ad61ee5a5a54b86844d0aba116b/vietnam.jpg とも参照できるようになった。ただし、このgithubusercontentを使う方法は画像を更新するとURLが変わってしまうので少し不便。 @@ -67,6 +69,8 @@ Gist用の.gitignoreはローカルだけに置くことにする。 図: http://bl.ocks.org/ を使ってGFM文章の中に画像を挿入した例。ベトナムみやげのクマのぬいぐるみの写真。  ## Secret Gistとは Gistを作るとき、それをSecret Gistと指定することもできる。 Secret GistのURLを友人に送ればそのGist文書を友人間で共有できる。 -
[email protected] revised this gist
May 26, 2015 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -61,8 +61,6 @@ Gist用の.gitignoreはローカルだけに置くことにする。 `git add vietnam.jpg`で後から画像を置くこともできる。 その画像は http://bl.ocks.org/ を使って http://bl.ocks.org/t-nissie/raw/9580883/vietnam.jpg と参照することができる。  図: http://bl.ocks.org/ を使ってGFM文章の中に画像を挿入した例。ベトナムみやげのクマのぬいぐるみの写真。 -
Takeshi Nishimatsu revised this gist
Apr 24, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -69,7 +69,7 @@ Gist用の.gitignoreはローカルだけに置くことにする。 ## Secret Gistとは Gistを作るとき、それをSecret Gistと指定することもできる。 Secret GistのURLを友人に送ればそのGist文書を友人間で共有できる。 Secret GistはGoogleなどのサーチエンジンの対象外にはなるが、 閲覧にパスワードが必要というわけではない。 Secret Gistは自分のGistのページで金色の枠が付いて表示される。 -
Takeshi Nishimatsu revised this gist
Feb 16, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Tipsなどのコメントを乞う。 その中にHowToGist.mdなどいくつかのファイルがcloneされる。 Gistのwebエディタ [Ace](http://ace.c9.io/ "Ace is an embeddable code editor written in JavaScript.") は特に日本語の編集に難があるので、Gistの文章は手もとで編集してgit pushするのが便利である。 ## 1つのエントリーに複数のファイルを置くことができる 1つのエントリーには1つのディレクトリが割り当てられ、そこに複数のファイルを置くことができる。 -
Takeshi Nishimatsu revised this gist
Feb 16, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -16,6 +16,9 @@ Tipsなどのコメントを乞う。 とすればHowToGistというディレクトリが作られ、 その中にHowToGist.mdなどいくつかのファイルがcloneされる。 Gistのwebエディタ [Ace](http://ace.c9.io/ "Ace is an embeddable code editor written in JavaScript.") は特に日本語の編集に難があるので、Gistの文章は手元で編集してgit pushするのが便利である。 ## 1つのエントリーに複数のファイルを置くことができる 1つのエントリーには1つのディレクトリが割り当てられ、そこに複数のファイルを置くことができる。 複数のファイルの表示順序は -
Takeshi Nishimatsu revised this gist
Aug 10, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -52,6 +52,7 @@ Gist用の.gitignoreはローカルだけに置くことにする。 * [公式API](https://developer.github.com/v3/markdown/ "API")を使う * [gfm2html.sh](https://gist.github.com/evertton/4133083 "gfm2html.sh") * [Firefox add-on GFM Viewer](https://addons.mozilla.org/en-US/firefox/addon/gfm-markdown-viewer/ "GFM Viewer") * [grip](https://github.com/joeyespo/grip "grip") ## 後から画像を置くこともできる `git add vietnam.jpg`で後から画像を置くこともできる。 -
Takeshi Nishimatsu revised this gist
Aug 10, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -51,6 +51,7 @@ Gist用の.gitignoreはローカルだけに置くことにする。 * [gfm2html.rb](https://gist.github.com/t-nissie/c415b7da3a694e82d6b5 "gfm2html.rb") * [公式API](https://developer.github.com/v3/markdown/ "API")を使う * [gfm2html.sh](https://gist.github.com/evertton/4133083 "gfm2html.sh") * [Firefox add-on GFM Viewer](https://addons.mozilla.org/en-US/firefox/addon/gfm-markdown-viewer/ "GFM Viewer") ## 後から画像を置くこともできる `git add vietnam.jpg`で後から画像を置くこともできる。 -
Takeshi Nishimatsu revised this gist
Aug 10, 2014 . 1 changed file with 0 additions and 22 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,22 +0,0 @@ -
Takeshi Nishimatsu revised this gist
Aug 10, 2014 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -46,9 +46,11 @@ Gist用の.gitignoreはローカルだけに置くことにする。 意味のあるファイル名を持ったGFMファイルが先頭に置かれてうまくHTML表示されるには、 ディレクトリ内のすべてのファイル名を工夫する必要がある。 手もとでGFMファイルをHTMLファイルに変換するには次に挙げるようないくつかの方法がある。 * Ruby Gemの[github-markdown](http://rubygems.org/gems/github-markdown "github-markdown")を用いる * [gfm2html.rb](https://gist.github.com/t-nissie/c415b7da3a694e82d6b5 "gfm2html.rb") * [公式API](https://developer.github.com/v3/markdown/ "API")を使う * [gfm2html.sh](https://gist.github.com/evertton/4133083 "gfm2html.sh") ## 後から画像を置くこともできる `git add vietnam.jpg`で後から画像を置くこともできる。 @@ -79,6 +81,6 @@ GitHubにアクセスして <!-- Local variables: compile-command: "gfm2html.rb --readme -l ja -n 'Takeshi Nishimatsu' -s style.css HowToGist.md > index.html" End: --> -
Takeshi Nishimatsu revised this gist
Jul 18, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -54,7 +54,7 @@ Gist用の.gitignoreはローカルだけに置くことにする。 `git add vietnam.jpg`で後から画像を置くこともできる。 その画像は http://bl.ocks.org/ を使って http://bl.ocks.org/t-nissie/raw/9580883/vietnam.jpg と参照することができる。 また、2014年4月頃から githubusercontent により https://gist.github.com/t-nissie/9580883/raw/a0a29d07307d0ad61ee5a5a54b86844d0aba116b/vietnam.jpg とも参照できるようになった。ただし、このgithubusercontentを使う方法は画像を更新するとURLが変わってしまうので少し不便。  -
Takeshi Nishimatsu revised this gist
May 23, 2014 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -62,11 +62,10 @@ Gist用の.gitignoreはローカルだけに置くことにする。 ## Secret Gistとは Gistを作るとき、それをSecret Gistと指定することもできる。 Secret GistのIDを友人に送ればそのGist文書を友人間で共有できる。 Secret GistはGoogleなどのサーチエンジンの対象外にはなるが、 閲覧にパスワードが必要というわけではない。 Secret Gistは自分のGistのページで金色の枠が付いて表示される。 ## GitHubにspammer/spammyと誤認されてしまったら あなたがあなたのGistにアクセスして -
Takeshi Nishimatsu revised this gist
May 13, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -54,6 +54,8 @@ Gist用の.gitignoreはローカルだけに置くことにする。 `git add vietnam.jpg`で後から画像を置くこともできる。 その画像は http://bl.ocks.org/ を使って http://bl.ocks.org/t-nissie/raw/9580883/vietnam.jpg と参照することができる。 また、2014年4月頃から githubusercontent により https://gist.github.com/t-nissie/9580883/raw/a0a29d07307d0ad61ee5a5a54b86844d0aba116b/vietnam.jpg とも参照できるようになった。  図: http://bl.ocks.org/ を使ってGFM文章の中に画像を挿入した例。ベトナムみやげのクマのぬいぐるみの写真。 -
Takeshi Nishimatsu revised this gist
Apr 11, 2014 . 1 changed file with 26 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,20 @@ Gistの使い方のメモ ================ Gistを使い始めて気がついた点をメモした。 Gistはこのようなメモや短いコードをバージョン管理しながら公開するのに便利。 特にこのメモでは、画像を同一ディレクトリに置いて、 それGFMファイル内に挿入する方法を解説。 このメモにはgitコマンドの使い方の解説はない。 このメモは随時更新される予定。 Tipsなどのコメントを乞う。 ## gitコマンドで手もとにcloneできる 例えば `git clone https://gist.github.com/9580883.git HowToGist` もしくは `git clone [email protected]:9580883.git HowToGist` とすればHowToGistというディレクトリが作られ、 その中にHowToGist.mdなどいくつかのファイルがcloneされる。 ## 1つのエントリーに複数のファイルを置くことができる 1つのエントリーには1つのディレクトリが割り当てられ、そこに複数のファイルを置くことができる。 @@ -54,6 +58,24 @@ Gist用の.gitignoreはローカルだけに置くことにする。 図: http://bl.ocks.org/ を使ってGFM文章の中に画像を挿入した例。ベトナムみやげのクマのぬいぐるみの写真。 ## Secret Gistとは Gistを作るとき、それをSecret Gistと指定することもできる。 Secret Gistには20桁程度の長めのIDが作られ、 そのIDを友人に送ればそのGist文書を友人間で共有できる。 Secret GistはGoogleなどのサーチエンジンの対象外にはなるが、 閲覧にパスワードが必要というわけではない。 ## GitHubにspammer/spammyと誤認されてしまったら あなたがあなたのGistにアクセスして "Whoops. We seem to have missed the gist of that gist you were looking for." 表示されたら、あなたはGitHubにspammer/spammyと誤認されている。 GitHubにアクセスして "One of our mostly harmless robots seems to think you are not a human." と赤で表示される場合も同様に誤認されている。 焦らずに https://github.com/contact を通して報告すれば、数時間以内に直してもらえる。 <!-- Local variables: compile-command: "./gfm2html.sh HowToGist.md > index.html" -
Takeshi Nishimatsu revised this gist
Apr 1, 2014 . 1 changed file with 16 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,22 @@ Tipsなどのコメントを乞う。 との [こと](http://stackoverflow.com/questions/17665267/how-do-you-control-the-order-in-which-files-appear-in-a-github-gist "stackoverflow")。 ## .gitignoreはローカルだけに置く Gistに.gitignoreを置くと見せたいファイルより [ASCIIbetical order](http://en.wikipedia.org/wiki/ASCIIbetical_order#Order "ASCIIbetical order") で前にきてしまって、.gitignoreが前面に出てきてしまう。 Gist用の.gitignoreはローカルだけに置くことにする。 その場合.gitignoreの中に.gitignoreも書く。 例えば https://gist.github.com/t-nissie/9771048 のための.gitignoreはこんなかんじ: *.dSYM *.log *.o crd2enex science.crd science.enex .gitignore ## GitHub Flavored Markdown (GFM) で書かれたものはHTMLに変換されて表示される このHowToGist.mdのように、 [GitHub Flavored Markdown (GFM)](https://help.github.com/articles/github-flavored-markdown "GFM") -
Takeshi Nishimatsu revised this gist
Mar 17, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ cat <<- HEAD <body> HEAD ~/gems/github-markdown-0.6.4/bin/gfm --readme $1 cat <<- TAIL </body> -
Takeshi Nishimatsu revised this gist
Mar 17, 2014 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,10 @@ Gistの使い方のメモ ================ Gistの有効な使い方のメモ。 Gistはこのようなメモや短いコードをバージョン管理しながら公開するのに便利。 特にこのメモでは、画像を同一ディレクトリに置いて、 それGFMファイル内に挿入する方法を解説。 随時更新してゆく予定。 Tipsなどのコメントを乞う。 -
Takeshi Nishimatsu revised this gist
Mar 16, 2014 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -28,10 +28,12 @@ Tipsなどのコメントを乞う。 ## 後から画像を置くこともできる `git add vietnam.jpg`で後から画像を置くこともできる。 その画像は http://bl.ocks.org/ を使って http://bl.ocks.org/t-nissie/raw/9580883/vietnam.jpg と参照することができる。  図: http://bl.ocks.org/ を使ってGFM文章の中に画像を挿入した例。ベトナムみやげのクマのぬいぐるみの写真。 <!-- Local variables: compile-command: "./gfm2html.sh HowToGist.md > index.html" -
Takeshi Nishimatsu revised this gist
Mar 16, 2014 . 1 changed file with 99 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,99 @@ /* -*-CSS-*- * style.css for README.html of feram * Time-stamp: <2013-11-30 12:19:00 takeshi> * Author: Takeshi NISHIMATSU */ body { color: black; font-family: verdana, arial, helvetica, sans-serif; } h1, h2, h3, h4, h6 { font-family: verdana, arial, helvetica, sans-serif; } h1 { color: #dd0000; background-color: #fff0f0; font-size: 240%; } h2 { border-top: red 5px solid; border-bottom: red 1px solid; padding-left: 8px; background-color: #fff0f0; } h3 { border-top: red 2px solid; border-bottom: red 1px solid; padding-left: 4px; } h4 { border-top: red 1px solid; padding-left: 4px; background-color: #fff0f0; } h5 { font-size: larger; font-family: courier, verdana, arial, helvetica, sans-serif; padding-top: 10px; color: darkred; } pre { font-family: monospace, courier, verdana, arial, helvetica, sans-serif; padding-right: 0.5em; padding-left: 0.5em; padding-top: 0.1ex; padding-bottom: 0.1ex; margin-left: 0.5em; margin-right: 1.0em; white-space: pre; color: darkred; background-color: #f3f3f3; } div.figure img { width:50%; margin: auto; display: block; } div.figure div.figcaption { width: 60%; margin: auto; display: block; } div.navi { text-align: right; margin-right: 1.0em; } div.contents { margin-left: 10%; } figure img{ width: 50%; margin: auto; margin-top: 3.0em; display: block; } figure figcaption{ width: 60%; margin: auto; margin-bottom: 3.0em; display: block; } table { border: blue 2px solid; text-align: center; margin: auto; } -
Takeshi Nishimatsu revised this gist
Mar 16, 2014 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Gistの有効な使い方のメモ。 Tipsなどのコメントを乞う。 ## gitで手もとにcloneできる 例えばこのGistをcloneするには:`git clone [email protected]:9580883.git foo` ## 1つのエントリーに複数のファイルを置くことができる 1つのエントリーには1つのディレクトリが割り当てられ、そこに複数のファイルを置くことができる。 @@ -27,10 +27,10 @@ Tipsなどのコメントを乞う。 を用いる。下に置いてあるgfm2html.shを使って`./gfm2html.sh HowToGist.md > index.html`などとやるとよい。 ## 後から画像を置くこともできる `git add vietnam.jpg`で後から画像を置くこともできる。 その画像次のように http://bl.ocks.org/ を使って参照することができる。  <!-- Local variables: -
Takeshi Nishimatsu revised this gist
Mar 16, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
LoadingSorry, something went wrong. Reload?Sorry, we cannot display this file.Sorry, this file is invalid so it cannot be displayed. -
Takeshi Nishimatsu revised this gist
Mar 16, 2014 . 1 changed file with 22 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ #!/bin/sh ## cat <<- HEAD <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>`basename $1 .md`</title> <meta name="author" content="Takeshi Nishimatsu" /> <meta name="copyright" content="Copyright © 2013 Takeshi Nishimatsu" /> <link rel="stylesheet" href="style.css" type="text/css" /> <link rel="shortcut icon" href="favicon.ico" /> </head> <body> HEAD ~/gems/github-markdown-0.6.3/bin/gfm --readme $1 cat <<- TAIL </body> </html> TAIL -
Takeshi Nishimatsu created this gist
Mar 16, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ Gistの使い方のメモ ================ Gistの有効な使い方のメモ。 随時更新してゆく予定。 Tipsなどのコメントを乞う。 ## gitで手もとにcloneできる 例:`git clone [email protected]:9579139.git foo` ## 1つのエントリーに複数のファイルを置くことができる 1つのエントリーには1つのディレクトリが割り当てられ、そこに複数のファイルを置くことができる。 複数のファイルの表示順序は [ASCIIbetical order](http://en.wikipedia.org/wiki/ASCIIbetical_order#Order "ASCIIbetical order") との [こと](http://stackoverflow.com/questions/17665267/how-do-you-control-the-order-in-which-files-appear-in-a-github-gist "stackoverflow")。 ## GitHub Flavored Markdown (GFM) で書かれたものはHTMLに変換されて表示される このHowToGist.mdのように、 [GitHub Flavored Markdown (GFM)](https://help.github.com/articles/github-flavored-markdown "GFM") で書かれたファイルはHTMLに変換されて表示される。 意味のあるファイル名を持ったGFMファイルが先頭に置かれてうまくHTML表示されるには、 ディレクトリ内のすべてのファイル名を工夫する必要がある。 ちなみに、手もとでGFMファイルをHTMLファイルに変換したい場合にはRuby Gemの [github-markdown](http://rubygems.org/gems/github-markdown "github-markdown") を用いる。下に置いてあるgfm2html.shを使って`./gfm2html.sh HowToGist.md > index.html`などとやるとよい。 ## 後から画像を置くこともできる `git add foo.jpg`で後から画像を置くこともできる。 その画像次のようには http://bl.ocks.org/ を使って参照することができる。  <!-- Local variables: compile-command: "./gfm2html.sh HowToGist.md > index.html" End: -->