Skip to content

Instantly share code, notes, and snippets.

@mattintosh4
mattintosh4 / chrome-source-viewer_dark-chalkboard.css
Created May 19, 2012 16:17
for Google Chrome Source Viewer (Komodo Edit Like)
.webkit-line-gutter-backdrop + table{
background-color:rgb(25,25,25);
font-size:12px;
line-height:1.5
}
.webkit-line-gutter-backdrop + table .webkit-line-content{
color:rgb(255,255,255);
font-family:"dejavu sans mono",monospace;
white-space:pre
}
mkdir build-32 && cd build-32 && ABI=32 \
../configure \
--prefix=/usr/local/tools/gmp/5.0.5/i386 \
--enable-cxx && make -j4 && make check && make install && cd ../ && mkdir build-64 && cd build-64 && ABI=64 \
../configure \
--prefix=/usr/local/tools/gmp/5.0.5/x86_64 \
--enable-cxx && make -j4 && make check && make install
@mattintosh4
mattintosh4 / DesktopIconSwitch.sh
Created October 12, 2012 15:45
シェルスクリプトサンプル
case "$(defaults read com.apple.finder CreateDesktop)" in
0) defaults write com.apple.finder CreateDesktop -bool YES;;
1) defaults write com.apple.finder CreateDesktop -bool NO;;
esac
killall Finder
@mattintosh4
mattintosh4 / ggr.sh
Created November 9, 2012 10:21
Google search form terminal
# --------------------------------------
# Google search from terminal
# --------------------------------------
ggr(){
_gU="$(echo $* | sed -e 's/^-[a-z] //' -e 's/ /+/g')"
_gU="https://www.google.co.jp/#hl=ja&safe=off&output=search&sclient=psy-ab&q=${_gU}&oq=${_gU}"
case $1 in
-c) _gA="/Applications/Google Chrome.app";;
-f) _gA="/Applications/Firefox.app";;
@mattintosh4
mattintosh4 / 0-README.md
Last active June 4, 2022 21:41
Automator 用シェルクリプト集 その1

Shell script for Automator Part.1

Automator のシェルスクリプトアクションで使えるサンプル集です。「アプリケーション」や「サービス」を作成するときにどうぞ。


入力の種類について

@mattintosh4
mattintosh4 / 0_README.md
Last active October 13, 2015 16:58
Automator 用シェルスクリプト集 その2

ShellScript for Automator Part.2

Mac OS X 10.6.8 / Automator 2.1.1

#!/bin/bash
#
# OSXShellScriptAppBuilder (C) 2012 mattintosh4
#
# Usage:
# bash <(curl https://raw.github.com/mattintosh4/OSXShellScriptAppBuilder/master/OSXShellScriptAppBuilder.sh) "module-name"
cat <<__EOF__
================================================================
--
-- Winetricks.app - Winetricks GUI
-- Created by mattintosh4 on 2013-04-09.
-- Copyright (c) 2013 mattintosh4, https://github.com/mattintosh4/iNSTANTWiNE
--
-- user edit area
property PREFIX : "/usr/local/bin"
property WINEPREFIX : "$HOME/.wine"
property ffplay : "/usr/local/bin/ffplay"
on main(input)
do shell script ffplay & space & quoted form of input
end main
on open argv
repeat with aFile in argv
main(POSIX path of aFile)
end repeat
#!/bin/bash
#
# OS X Wine.app creator
# Copyright (c) 2013 mattintosh4, http://mattintosh.hatenablog.com
#
# usage:
# bash wine_application_bundle_creator.sh /opt/local/bin/wine
#
test -x "$1" || { echo "WINELOADER is not found. Please set argument to WINELOADER path."; exit; }