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
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
## なんとなく嫌だ | |
my %seen; | |
@opt_icode = grep { not $seen{$_}++ } @opt_icode; | |
## ダサい | |
{ | |
my %seen; | |
@opt_icode = grep { not $seen{$_}++ } @opt_icode; | |
} |
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
#include <unistd.h> | |
#include <curses.h> | |
char *sl[] = { | |
" o o o", | |
" o ", | |
" o ____ ", | |
" -- |OO| ", | |
" _||__| | ", | |
" | | ", |
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
package App::Greple::diff; | |
1; | |
=head1 NAME | |
diff - greple module for diff command output | |
=head1 SYNOPSIS |
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