Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / switchbot_status.py
Created June 23, 2024 12:09
ChatGPTにお願いして Switchbotの温湿度計の値をCSVに追記していくPythonプログラムを作ってもらいました。 実行時にはswitchbot_devices.jsonを用意しておく必要あります(device_id,device_nameをJSONで定義)。 CSVのファイル名はdevice_name.csvとなります。
import requests
import json
import time
import hmac
import hashlib
import base64
from datetime import datetime
import os
# SwitchBot APIトークンとシークレットキー