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 characters
#!/usr/bin/perl | |
# https://qiita.com/jkr_2255/items/8bae27d026754d4e2474 | |
# 「7の倍数」を表す正規表現 | |
use v5.24; | |
use warnings; | |
use Data::Dumper; | |
my $NUM_STATES = 7; |
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 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 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 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 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 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 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 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 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 characters
option default --mecab |
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 characters
$_ = do { local $/; <> }; | |
if (open(CHLD, '|-') == 0) { | |
print <>; | |
exit; | |
} | |
print CHLD $_; |
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 characters
tir -rGRc10 |
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 characters
while (/pattern/g) { | |
my($s, $e) = ($-[0], $+[0]); | |
... |
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 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 |
NewerOlder