Skip to content

Instantly share code, notes, and snippets.

View ikait's full-sized avatar

Taishi Ikai ikait

View GitHub Profile
@ikait
ikait / connect-afp.applescript
Created May 26, 2013 03:34
NASにいっぺんに接続するためのAppleScript
set ssid to (do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport --getinfo")
if ssid contains "家のSSID" then
tell application "Finder"
delay 10
mount volume "afp://サーバのアドレス/ディレクトリ(任意)"
-- 複数マウントしたいときは上の行をコピペして増やす
end tell
end if
@ikait
ikait / index.html
Created May 26, 2013 03:27
タブ切り替えビュー (jQueryプラグイン版 ・タブ切り替え用のカスタムイベントを作って、triggerで動かす。
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
<script src="jquery-1.10.0.js"></script>
<script src="jquery.tabs.js"></script>
<script>
$(function () {
$("nav").tabs({
@ikait
ikait / pw.sh
Created April 26, 2013 09:03
Parallels をわりと簡単にコマンドから使う
#!/bin/bash
name=`basename $0`
prlctl list --info "${1}" > /dev/null
if [ "$?" -eq 0 ] ; then
os="$1"
id=`prlctl snapshot-list "${os}" | grep -oE '\*{.*\}' | tr -d '*{}'`
action="$2"