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
\documentclass[uplatex,dvipdfmx]{jsarticle} | |
\usepackage[papersize={580pt,7410pt},margin=10pt,noheadfoot,dvipdfm]{geometry} | |
\usepackage{otf} | |
\usepackage{color} | |
\usepackage{pgffor} | |
\pagestyle{empty} | |
\usepackage{numprint} | |
\npthousandsep{} | |
\nplpadding{5} |
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
\documentclass[uplatex,a5paper,twoside]{jsarticle} | |
\usepackage{pxrubrica} | |
\pagestyle{myheadings} | |
\usepackage[margin=15mm,headsep=5mm]{geometry} | |
\makeatletter | |
% 縦組にする | |
\AtBeginDocument{\tate\adjustbaseline} | |
% \textheight と \textwidth を逆転 |
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/ruby | |
require 'rexml/document' | |
dict = REXML::Document.new(open("ユーザ辞書.plist")) | |
open("user_word.txt","w:UTF-16LE"){|f| | |
f.print "\uFEFF!!ATOK_TANGO_TEXT_HEADER_1\r\n\r\n" | |
dict.elements.each('plist/array/dict') do |element| | |
phrase = element.elements[2].text | |
shortcut = element.elements[4].text |
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/ruby | |
operators = ['+','-','*','/'] | |
patterns = ["((%f %s %f) %s %f) %s %f", | |
"(%f %s %f) %s (%f %s %f)", | |
"(%f %s (%f %s %f)) %s %f", | |
"%f %s ((%f %s %f) %s %f)", | |
"%f %s (%f %s (%f %s %f))"] | |
NOTFOUND = "NOT FOUND" |
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/swift | |
import Cocoa | |
import Quartz | |
var openPanel = NSOpenPanel() | |
openPanel.canChooseDirectories = true | |
openPanel.canChooseFiles = false | |
let returnCode = openPanel.runModal() |
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
let wisdomPath: String | |
if #available(OSX 10.13, *) { | |
wisdomPath = "/System/Library/Assets/com_apple_MobileAsset_DictionaryServices_dictionaryOSX/65c5f4f22827dba6b0a6bc85755863317890953b.asset/AssetData/Sanseido The WISDOM English-Japanese Japanese-English Dictionary.dictionary" | |
} else { | |
wisdomPath = "/Library/Dictionaries/Sanseido The WISDOM English-Japanese Japanese-English Dictionary.dictionary" | |
} | |
// "swift" の意味を取得 | |
let word = "swift" | |
if let content = DictionaryServiceManager().lookUp(word, inDictionary: wisdomPath) { |
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
\documentclass[uplatex]{jsarticle} | |
\usepackage[margin=1.5cm]{geometry} | |
\pagestyle{empty} | |
\usepackage{otf} %% BMP外文字を出力したいので | |
\usepackage{upjcode} | |
%%% \kutenTable{区}{点} | |
%%% 与えられた JIS X 0208 の区点位置に関する文字情報の表を作成する。 | |
\def\kutenTable#1#2{\texttt{% | |
\begin{tabular}{|l|l|} \hline |
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/ruby -W0 | |
# coding: utf-8 | |
# | |
# This software is derived from bmp.rb provided by Yoichi Yokogawa. | |
# https://github.com/yoyoichi/bmp-ruby | |
# | |
# This software is released under the MIT License. | |
# http://opensource.org/licenses/mit-license.php | |
### BitMap class |
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
// How to compile: | |
// swiftc -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -o pageboxinfo pageboxinfo.swift | |
import Foundation | |
import Quartz | |
extension CGPDFBox { | |
var title: String { | |
switch self { | |
case .mediaBox: | |
return "MediaBox: " |
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
#!/bin/bash | |
# This program is licensed under the terms of the MIT License. | |
# | |
# Copyright (c) 2014 Munehiro Yamamoto <munepixyz@gmail.com> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |