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
function onOpen() { | |
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var menuEntries = [ {name: "印刷用ドキュメント作成", functionName: "createDoc"} ]; | |
spreadsheet.addMenu("カスタムメニュー", menuEntries); | |
} | |
const removeFirstEmptyParagraph = (body) => { | |
const firstParagraph = body.getParagraphs()[0]; | |
if (firstParagraph.getText() === '') { | |
firstParagraph.removeFromParent(); |
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
#include <unistd.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <term.h> | |
void mvprintw(int y, int x, const char* fmt, const char* str) { | |
tputs(tparm(tgoto(cursor_address, x, y)), 1, putchar); | |
printf(fmt, str); | |
} | |
char *sl[] = { | |
" o o o o", |
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
(defun activate-follow-mode (&optional window) | |
(follow-mode t) | |
(display-line-numbers-mode t)) | |
(advice-add 'split-window-right :after 'activate-follow-mode) | |
(defun deactivate-follow-mode (&optional window del-all) | |
(when (= 1 (length (window-list))) | |
(follow-mode -1) | |
(display-line-numbers-mode -1))) | |
(dolist (cmd '(delete-window |
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
javascript: { | |
const info = new Map([ | |
[ 'HNAME', 'ホテルサザンコースト宮古島' ], | |
[ 'HTEL', '0980-75-3335' ], | |
[ 'ARRDATEY', '2019' ], | |
[ 'ARRDATEM', '4' ], | |
[ 'ARRDATED', '12' ], | |
[ 'DPTDATEY', '2019' ], | |
[ 'DPTDATEM', '4' ], | |
[ 'DPTDATED', '16' ] |
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
option default --mecab |
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
$_ = do { local $/; <> }; | |
if (open(CHLD, '|-') == 0) { | |
print <>; | |
exit; | |
} | |
print CHLD $_; |
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
tir -rGRc10 |
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
while (/pattern/g) { | |
my($s, $e) = ($-[0], $+[0]); | |
... |
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
;;; cdif.el --- cdif and ansi-color interface | |
;;; Code: | |
(autoload 'ansi-color-apply-on-region "ansi-color" nil t) | |
(defun cdif-buffer (&optional prefix) | |
"Execute cdif command on current buffer and apply ansi-color." | |
(interactive "P") | |
(if prefix |
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
#!/usr/bin/perl -CSD | |
use strict; | |
use warnings; | |
use utf8; | |
my %モンスター = ( | |
0 => "ゼクロム", | |
1 => "ワンリキー", | |
2 => "ニョロモ", |
NewerOlder