Yatexからdvipdfmxを使ってpdfを生成したあと自動的にPreview.appで開くためのスクリプト。
dvpd.shを /usr/local/bin
とかのPATHの通った処に置く。
Linux 環境で使うときは、open -a Preview.app
の部分をLinuxのアプリケーション起動コマンドに書き換える必要がある。
#!/usr/bin/perl | |
# | |
# This is UpFtp, Version 1.3 | |
# Copyright (C) 2000,2003,2006,2017 by Hiroshi Yuki. | |
# http://www.hyuki.com/upftp/ | |
# https://gist.github.com/hyuki0000/f58ccabccba37b93dbb5823d4f019341 | |
# This program is free software; you can redistribute it and/or | |
# modify it under the same terms as Perl itself. | |
# Add [my $ home = $ ENV {"HOME"}] to share on Mac & Linux at 20170713 by Minoru Yamada. | |
# |
#%PERL | |
use strict; | |
use warnings; | |
print "月の末日を取得する。\n"; | |
my $end_of_this_month = end_of_month(2017, 12); | |
print "2017年12月の月末日は$end_of_this_month日です。\n"; | |
# 月末日を求める関数。 | |
sub end_of_month { |
# %PERL | |
my $main = '凡そ天下に去来ほどの小さな墓に参りけりだぞ'; | |
$length = length $main; | |
if ($length > 40){&error("文字数が20文字を超えています。余分な空白が入っていませんか?"); | |
}else{ | |
print $length; | |
} |
/etc/lightdm/lightdm.conf | |
[Seat:*] | |
pam-service=lightdm | |
pam-autologin-service=lightdm-autologin | |
autologin-user=username | |
autologin-user-timeout=0 | |
session-wrapper=/etc/X11/Xsession |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; Emacs on WSL open links in Windows web browser | |
;; https://adam.kruszewski.name/2017/09/emacs-in-wsl-and-opening-links/ | |
(when (getenv "WSLENV") | |
(let ((cmd-exe "/mnt/c/Windows/System32/cmd.exe") | |
(cmd-args '("/c" "start"))) | |
(when (file-exists-p cmd-exe) | |
(setq browse-url-generic-program cmd-exe | |
browse-url-generic-args cmd-args | |
browse-url-browser-function 'browse-url-generic |
# get-month.pl | |
my ($sec,$min,$hour,$day,$mon,$year,$wdy,$yday,$isdst)=localtime; | |
$mon++; | |
$year += 1900; | |
if($mon < 10){$mon = "0$mon";} | |
if($day < 10){$day = "0$day";} | |
my $month = "$year$mon"; | |
my $kyou = "$year$mon$day"; |
#### 締切りチェック (WEB句会用に追加) | |
($sec,$min,$hour,$day,$mon,$year,$wdy,$yday,$isdst)=localtime; | |
$mon++; | |
my $monn = $mon; | |
$year += 1900; | |
if($mon < 10){$mon = "0$mon";} | |
if($day < 10){$day = "0$day";} | |
if($hour < 10){$hour = "0$hour";} | |
if($min < 10){$min = "0$min";} |
#!/usr/bin/perl | |
# Copyright (C) 2001-2003 All right reserved by Shinya Kondo ( CGI KON ) | |
require "cgi-lib.pl"; | |
# 検索用関数 | |
sub Search_Pattern | |
{ |