View WebToScrapbox.js
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
/* | |
* WebToScrapbox.js | |
* ブラウザで見ているページのタイトルとURLをScrapboxに保存するBookmarklet | |
*/ | |
function start() { | |
const project = 'https://scrapbox.io/YOURPROJECT/'; | |
const url = location.href; | |
const title = document.title; | |
const body1 = "\n " + title; | |
const body2 = "\n [" + title + ' ' + url + ']'; |
View a.rb
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
puts "World" |
View bold.rb
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
text = <<"EOD" | |
Lorem**ipsum**dolorsitamet, | |
con*secteturadipiscing**elit**, | |
**sed****do**eiusmod**temporincididunt | |
utlabore**etdoloremagnaaliqua. | |
EOD | |
html = <<"EOD" | |
Lorem<b>ipsum</b>dolorsitamet, | |
con*secteturadipiscing<b>elit</b>, |
View commonmarker-test.rb
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
require 'commonmarker' | |
md = '$$\begin{align}x\\\\y\end{align}$$' | |
puts "BEFORE:" + md | |
puts "AFTER :" + CommonMarker.render_html(md) |
View BookMarkDown.js
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
/* | |
* BookMarkDown.js | |
* ブラウザで見ているページのタイトルとURLを、 | |
* - [タイトル](URL) という形式と、 | |
* タイトル+改行+URL+改行 という形式と、 | |
* [タイトル URL] という形式にする | |
* Bookmarklet | |
*/ | |
function start() { | |
let url = location.href; |
View text-to-speech-quick-example-with-azure-in-japanese.js
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
// cf. https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/quickstart/javascript/node/text-to-speech/index.js | |
var subscriptionKey = "99999999999999999999999999999999"; // Your Subscription Key. | |
var serviceRegion = "japaneast"; // "westus" | |
var filename = "output.mp3"; | |
var audioConfig = sdk.AudioConfig.fromAudioFileOutput(filename); | |
var speechConfig = sdk.SpeechConfig.fromSubscription(subscriptionKey, serviceRegion); | |
// https://docs.microsoft.com/en-us/javascript/api/microsoft-cognitiveservices-speech-sdk/speechsynthesisoutputformat?view=azure-node-latest |
View gserr.txt
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
$ dvipdfmx test.dvi | |
GPL Ghostscript 9.16: Can't find initialization file gs_init.ps. | |
$ gs --version | |
GPL Ghostscript 9.16 (2015-03-30) | |
$ brew info gs | |
ghostscript: stable 9.25 (bottled), HEAD | |
$ brew link ghostscript |
View girlnote323-contains.java
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
// 注意:本文に近付けるため、Javaとしては不自然な書き方になっています | |
// cf: https://cakes.mu/posts/33738 | |
class Node { | |
int value; | |
Node next; | |
public Node(int value, Node next) { | |
this.value = value; | |
this.next = next; | |
} |
View girlnote323-contains-instance.java
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
// 注意:本文に近付けるため、Javaとしては不自然な書き方になっています | |
// cf: https://cakes.mu/posts/33738 | |
class List { | |
Node head; | |
public List(int... values) { | |
this.head = new Node(0, null); | |
this.head.next = this.head; | |
Node p = this.head; | |
for (int i = values.length - 1; i >= 0; i--) { |
View kuku.rb
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
yomi = { | |
"2" => 'に', | |
"3" => 'さ', | |
"4" => 'し', | |
"5" => 'ご', | |
"6" => 'む', | |
"7" => 'な', | |
"8" => 'は', | |
"9" => 'く', | |
} |
NewerOlder