Skip to content

Instantly share code, notes, and snippets.

@takamii
takamii / com.takamii.iTeleportLaunchd.plist
Last active February 17, 2016 14:51
iTeleport Connectが常駐するようにプロセス落ちていたら自動起動させる。~/Library/LaunchAgentsに入れておいて、launchctl load xxx.plist(フルパス)で起動させる。plist中のKeepAliveがtrueだと常駐モードになる。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.takamii.iTeleportLaunchd</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/iTeleport Connect.app/Contents/MacOS/iTeleport Connect</string>
</array>
@takamii
takamii / Notations.html
Last active December 16, 2015 05:09
TumblrテーマのNotations(http://www.tumblr.com/theme/8631)を以下のように改良しました。 主に写真を自分好みに表示できるように修正してあります。テキストなどの表示は確認していません^^ 次のBLOG(http://memory.takamii.com)でこのテーマを使用しています。 修正箇所 ・写真をセンタリングし大きく表示。 ・ブラウザの横幅に応じて写真の大きが変わるように。 ・タイトル画像をアップロードできるように。 ・Google AnalyticsのIDを設定できるように。 ・Twitterリンクを追加できるように。 ・検索ボックスを非表示にできるように。 ・その他細かなCSS調整。
<!doctype html>
<!--
"Notations" theme designed by Ben Delaney (http://bendelaney.me)
Available in the Tumblr theme garden: http://www.tumblr.com/theme/8631
Modifed by @takamii
Photo show large
@takamii
takamii / error.log
Created June 10, 2012 12:02
実機でtheos使ってmakeしてみた時のエラー。たぶんheader-fileが読み込めてない。試しにつかったソースはSwipeShiftCaret
Making all for tweak SwipeShiftCaret...
Preprocessing SwipeShiftCaret.x...
Compiling SwipeShiftCaret.x...
SwipeShiftCaret.x:2:46: error: UIKit/UIGestureRecognizerSubclass.h: No such file or directory
SwipeShiftCaret.x:13: error: cannot find protocol declaration for 'UITextInput'
SwipeShiftCaret.x:35: error: expected ')' before 'UIKBKey'
SwipeShiftCaret.x:40: error: cannot find interface declaration for 'UISwipeGestureRecognizer', superclass of 'SCSwipeGestureRecognizer'
SwipeShiftCaret.x:43: error: expected ')' before 'UIGestureRecognizer'
SwipeShiftCaret.x: In function '-[SCSwipeGestureRecognizer canBePreventedByGestureRecognizer:]':
SwipeShiftCaret.x:44: error: 'UIPanGestureRecognizer' undeclared (first use in this function)
@takamii
takamii / bkup_system.sh
Created April 19, 2012 16:23
iPhoneバックアップスクリプト(iOS5.x用)
#!/bin/sh
#
# iOS5.xの設定ファイル&データのバックアップスクリプト
#
# 使い方:
# rootユーザでbkup_system.shを実行すると、カレントに現在の年月日でフォルダを作成しその中にtgz形式で
# バックアップを取得します。主に/var/mobile/Library配下の設定ファイルやデータをバックアップ。
# バックアップファイルは、各フォルダ名.tgz
#
@takamii
takamii / softrespring
Created August 19, 2011 14:13
LOCK画面を経由しないrespringコマンド。ericaたんのplutilが必要。 for iOS
#!/bin/sh
plutil -key SBLanguageRestart -value true -type bool /var/mobile/Library/Preferences/com.apple.springboard.plist
respring
@takamii
takamii / forcerespring
Created August 19, 2011 14:02
コマンドラインから強制respringしたい場合のコマンド。 for iOS
#!/bin/sh
killall -9 SpringBoard
@takamii
takamii / safemode
Created August 19, 2011 14:00
コマンドラインからSafemodeにしたい場合どうぞ。for iOS
#!/bin/sh
touch /var/mobile/Library/Preferences/com.saurik.mobilesubstrate.dat
respring
@takamii
takamii / bkupsyslog
Created August 19, 2011 13:53
現在日時をファイル名につけてsyslogを圧縮バックアップ。gzipが必要。
#!/bin/sh
DATETIME="`date +%Y%m%d_%H%M`"
launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
mv /var/log/syslog /var/log/syslog_$DATETIME
touch /var/log/syslog
launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist
gzip /var/log/syslog_$DATETIME
@takamii
takamii / UserHostEntries
Created June 17, 2011 13:21
AdBlock用個別設定(日本ADサイト)。/var/mobile/Library/Preferences/UserHostEntriesに配置。AdBlock使用していない人は直接/etc/hosts等を編集。FC2とかのiPhone向けフロート広告を無効にします。
## START AdBlock UserHostEntries ##
0.0.0.0 js1.nend.net
0.0.0.0 ad1.nend.net
0.0.0.0 mmv.admob.com
0.0.0.0 static.adlantis.jp
0.0.0.0 sp.ad.adlantis.jp
0.0.0.0 sp.click.adlantis.jp
0.0.0.0 as.dc.impact-ad.jp
0.0.0.0 ad.mdn.co.jp
0.0.0.0 fileserver.glam.com
@takamii
takamii / prerm
Created June 13, 2011 17:23
既存ファイルの置き換え処理をするprerm。ファイル権限は755に。Localizable.stringsをLocalizable.strings.modに戻し、退避しておいたLocalizable.strings.bakをLocalizable.stringsに戻す。
#!/bin/sh
DIR="/Library/Activator/ja.lproj"
FILE="Localizable.strings"
mv ${DIR}/${FILE} ${DIR}/${FILE}.mod
if [ -e ${DIR}/${FILE}.bak ]; then
mv ${DIR}/${FILE}.bak ${DIR}/${FILE}
fi