Skip to content

Instantly share code, notes, and snippets.

@mattintosh4
mattintosh4 / ai-kiritan-wrapper-mac.sh
Created March 8, 2020 12:28
AIきりたんラッパー (Mac版)
set -e
set -u
neutrinoDir=${1}
shift
set -- -b "${1}" -s "${2}" -n "${3}" -m "${4}" -p "${5}" -f "${6}"
while getopts b:f:m:n:p:s: arg
do
@mattintosh4
mattintosh4 / ai-kiritan-wrapper-docker.sh
Last active March 4, 2020 13:19
AIきりたんラッパー (Docker版)
set -e
set -u
neutrinoDir=${1}
shift
set -- -b "${1}" -s "${2}" -n "${3}" -m "${4}" -p "${5}" -f "${6}"
while getopts b:f:m:n:p:s: arg
do
@mattintosh4
mattintosh4 / Dockerfile
Last active March 4, 2020 04:17
NEUTRINO Dockerfile
FROM ubuntu:18.04
RUN apt-get update && apt-get -y install libgomp1
@mattintosh4
mattintosh4 / ai-kiritan-wrapper.sh
Created February 26, 2020 15:05
AIきりたんラッパー
set -e
set -u
neutrinoDir=${1}
shift
set -- -b "${1}" -s "${2}" -n "${3}" -m "${4}" -p "${5}" -f "${6}"
bundleIdentifier=com.github.mattintosh4.easywine
bundlePath=$(osascript -e $'use framework "AppKit"\non run argv\nPOSIX path of ((current application\'s NSWorkspace\'s sharedWorkspace()\'s URLForApplicationWithBundleIdentifier:(item 1 of argv)) as string)\nend run' -- ${bundleIdentifier})
@mattintosh4
mattintosh4 / Run.sh
Last active March 4, 2020 13:47
Wineloader for AI-Kiritan/NEUTRINO
#!/bin/ksh
set -e
set -u
#set -x
PS4=$'\e[32m>>>\e[m '
while getopts b:e:f:m:n:p:h arg
do
case ${arg} in
#!/bin/bash
# vim:fenc=utf-8 ff=unix ft=sh et sts=4 sw=4 ts=4:
set -e
set -u
#set -x
PATH=/usr/local/bin:/usr/bin:/bin
: ${QUALITY:=90}
dnf -y install httpd mysql-server patch php php-intl php-json php-mbstring php-mysqlnd php-opcache php-pdo php-pecl-zip php-xml
wget http://downloads.ec-cube.net/src/eccube-4.0.3.zip
unzip -q eccube-4.0.3
rm -rf /var/www/html
mv eccube-4.0.3 /var/www/html
chown -R apache: /var/www/html
patch /etc/httpd/conf/httpd.conf <<'!'
--- /dev/fd/63 2019-12-03 22:46:40.673649696 +0900
+++ httpd.conf 2019-12-03 22:46:05.214422731 +0900
@@ -144,14 +144,14 @@
#!/bin/bash
set -e
set -u
set -x
name="El Capitan"
tempfile=$(mktemp -u)
hdiutil create -size 8g -fs HFS+J -layout SPUD ${tempfile}
hdiutil attach ${tempfile}.dmg -noverify -nobrowse -mountpoint "/Volumes/Install OS X ${name}"
sudo "/Applications/Install OS X ${name}.app/Contents/Resources/createinstallmedia" --volume "/Volumes/Install OS X ${name}" --applicationpath "/Applications/Install OS X ${name}.app" --nointeraction
#!/bin/bash
set -e
set -u
set -x
name="High Sierra"
tempfile=$(mktemp -u)
hdiutil create -size 8g -fs HFS+J -layout SPUD ${tempfile}
hdiutil attach ${tempfile}.dmg -noverify -nobrowse -mountpoint "/Volumes/Install macOS ${name}"
sudo "/Applications/Install macOS ${name}.app/Contents/Resources/createinstallmedia" --volume "/Volumes/Install macOS ${name}"
@mattintosh4
mattintosh4 / gist:7e1d07beca8449438abee52d1f92ea46
Last active November 15, 2019 18:06
XMTrading MT4 for Mac (Japanese font settings)
/usr/bin/curl -O 'http://ftp.jaist.ac.jp/pub/Linux/debian/pool/main/f/fonts-vlgothic/fonts-vlgothic_20141206.orig.tar.xz'
/usr/bin/tar xf fonts-vlgothic_20141206.orig.tar.xz --strip=1 '**.ttf'
cp VL-Gothic-Regular.ttf VL-PGothic-Regular.ttf ~/Library/Application\ Support/com.xmtrading.mt4_???????????????/drive_c/windows/Fonts
rm fonts-vlgothic_20141206.orig.tar.xz VL-PGothic-Regular.ttf VL-Gothic-Regular.ttf
/usr/bin/iconv -f UTF-8 --unicode-subst="\x%04x" -t ISO-8859-1 <<! | tee -a ~/Library/Application\ Support/com.xmtrading.mt4_???????????????/user.reg
[Software\\\\Wine\\\\Fonts\\\\Replacements] $(date +%s)
"MS UI Gothic"="VL PGothic"
"MS ゴシック"="VL Gothic"
"MS Pゴシック"="VL PGothic"