Skip to content

Instantly share code, notes, and snippets.

View matsu911's full-sized avatar

Shigeaki Matsumura matsu911

View GitHub Profile
@matsu911
matsu911 / data
Created May 26, 2016 12:36
binary
00000000: ee3e 24ab 2910 b28b 7a1e 47b8 53b2 bcf4 .>$.)...z.G.S...
00000010: 6400 2175 3637 6265 6262 3830 3761 6166 d.!u67bebb807aaf
00000020: 3831 3739 3066 3732 3165 3338 6431 3432 81790f721e38d142
00000030: 3234 6639 0013 582d 4c69 6e65 2d43 6861 24f9..X-Line-Cha
00000040: 6e6e 656c 546f 6b65 6e00 ac38 6962 6369 nnelToken..8ibci
00000050: 5364 474d 4347 6972 2f6a 4530 7a39 3277 SdGMCGir/jE0z92w
00000060: 6d67 4a2b 3938 6c44 6478 7741 7037 6376 mgJ+98lDdxwAp7cv
00000070: 5833 6d6b 734c 3938 5948 486a 414d 3938 X3mksL98YHHjAM98
00000080: 7672 5246 4851 4679 5766 336f 4344 5663 vrRFHQFyWf3oCDVc
00000090: 667a 6b73 7135 3835 7370 3875 5753 556f fzksq585sp8uWSUo
require 'digest/sha1'
require 'sqlite3'
def sha1(s)
Digest::SHA1.hexdigest(s)
end
backup_dir = '1b345454cbec76848e94c41ce0a2d6b7328973e9'
backup_path = "#{ENV['HOME']}/Library/Application Support/MobileSync/Backup/#{backup_dir}"
require 'digest/sha1'
require 'sqlite3'
def sha1(s)
Digest::SHA1.hexdigest(s)
end
backup_dir = '1b345454cbec76848e94c41ce0a2d6b7328973e9'
backup_path = "#{ENV['HOME']}/Library/Application Support/MobileSync/Backup/#{backup_dir}"
@matsu911
matsu911 / gist:6557189
Created September 13, 2013 23:05
RM2.8でrake --trace AVFoundationとCoreMeidaをframeworkに追加
$ rake --trace
** Invoke default (first_time)
** Invoke simulator (first_time)
** Execute simulator
** Invoke build:simulator (first_time)
** Execute build:simulator
/usr/bin/env VM_KERNEL_PATH="/Library/RubyMotion2.8/data/ios/6.0/iPhoneSimulator/kernel-i386.bc" VM_OPT_LEVEL="0" /usr/bin/arch -arch i386 /Library/RubyMotion2.8/bin/ruby --uses-bs "/Library/RubyMotion2.8/data/ios/6.0/BridgeSupport/RubyMotion.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/6.1/BridgeSupport/RubyMotion.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/7.0/BridgeSupport/RubyMotion.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/6.0/BridgeSupport/UIKit.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/6.1/BridgeSupport/UIKit.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/7.0/BridgeSupport/UIKit.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/6.0/BridgeSupport/Foundation.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/6.1/BridgeSupport/Foundation.bridgesupport"
@matsu911
matsu911 / gist:6557172
Created September 13, 2013 23:03
RM2.8でrake --trace AVFoundationのみapp.frameworksに追加
$ rake --trace
** Invoke default (first_time)
** Invoke simulator (first_time)
** Execute simulator
** Invoke build:simulator (first_time)
** Execute build:simulator
/usr/bin/env VM_KERNEL_PATH="/Library/RubyMotion2.8/data/ios/6.0/iPhoneSimulator/kernel-i386.bc" VM_OPT_LEVEL="0" /usr/bin/arch -arch i386 /Library/RubyMotion2.8/bin/ruby --uses-bs "/Library/RubyMotion2.8/data/ios/6.0/BridgeSupport/RubyMotion.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/6.1/BridgeSupport/RubyMotion.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/7.0/BridgeSupport/RubyMotion.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/6.0/BridgeSupport/UIKit.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/6.1/BridgeSupport/UIKit.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/7.0/BridgeSupport/UIKit.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/6.0/BridgeSupport/Foundation.bridgesupport" --uses-bs "/Library/RubyMotion2.8/data/ios/6.1/BridgeSupport/Foundation.bridgesupport"
@matsu911
matsu911 / gist:6020219
Created July 17, 2013 12:43
RubyMotion 2.4のブロックに関するバグ。 block内のローカル変数が外側の同名の変数を上書きしている。
describe "Application 'block_bug'" do
it "block bug" do
x = 1
[2, 3].each{ |x| x}
x.should == 1
end
end
@matsu911
matsu911 / gist:5910202
Created July 2, 2013 15:18
毎回rakeの前にバッファをキルする変更
(defun motion-execute-rake-command ()
(let* ((use-bundler (motion-bundler-p))
(buf (let ((buffer-name (concat "*" motion-execute-rake-buffer "*")))
(when (get-buffer buffer-name)
(let ((kill-buffer-query-functions nil))
(kill-buffer buffer-name)))
(get-buffer-create buffer-name)))
(sub-command (motion-get-rake-sub-command use-bundler))
(params (motion-construct-rake-command use-bundler sub-command)))
(message "%s" (mapconcat (lambda (p) (if p (concat p " ") "")) params ""))
(defun test ()
"test")