-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.snippets
125 lines (99 loc) · 4.55 KB
/
.snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# macbook setup
ln -s /Users/srea/Documents/dev/shared_zsh_history.txt .zsh_history # history share
# openssl
openssl rsa -in id_rsa -out id_rsa # 鍵を取り除く
# curl
curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' localhost
echo "{}" | curl URL -X POST -H "Content-Type: application/json" -d @-
# gem
sudo gem install cocoapods -n /usr/local/bin
# git
git archive master --output=master.tar.gz
git pull-request -b v4/master -m "[WIP] "
git rm --cached `git ls-files --full-name -i --exclude-from=.gitignore`
git reset --hard ^HEAD
git reset --soft HEAD^
git reset --merge git remote set-branches origin '*' # unshallow後にremote branchを取得する
git log 3.14.2..rc-3.15.0 --merges --first-parent --reverse --pretty=format:"- %b(%s)" | sed -E 's/\(Merge pull request (#[0-9]+) from ..*$/ \1/'
git clean -f -d
git rev-list HEAD | wc -l | tr -d ' '
git branch --merged | grep -vE '^\*|master$|develop$' | xargs -I % git branch -d %
git remote set-url origin [email protected]:Owner/texas.git # https -> ssh git
# for Pull Request (brew install ffmpeg)
ffmpeg -i input.mov -vf scale=320:-1 -an -r 10 output.gif
ffmpeg -i IMG_0077.MOV -vcodec copy -map 0:0 iOS_VoIP.mp4 # 音声を削除
ffmpeg -i ./input.mov -pix_fmt yuv420p ./output.mp4
# convert
mogrify -format pdf xx.svg
# empty commit
git ci --allow-empty -m "fixed #"
# ats
nscurl --ats-diagnostics --verbose https://
# android
keytool -v -list -keystore xxx.keystore
adb shell service call iphonesubinfo 1 | awk -F "'" '{print $2}' | sed '1 d' | tr -d '.' | awk '{print}' ORS= # IMEI
adb shell pm list packages | grep xxx | # search apk
# for iOS Xcode
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcode-select -s /Applications/Xcode_9_2.app/Contents/Developer
codesign -d --entitlements :- ios.app
codesign -vv -d ios.app
security find-identity -v -p codesigning
xcrun lipo -info 実行ファイル
otool -L ios.app/ios
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/org.carthage.CarthageKit/DerivedData/*
xcrun instruments -w 'iPhone X'
instruments -s devices # udid list
xcrun simctl list | egrep '(Booted)'
security cms -D -i ~/Library/MobileDevice/Provisioning\ Profiles/xxx.mobileprovision # プロビジョニング内を見る
xcrun simctl io booted recordVideo record.mov
## https://developer.apple.com/library/archive/technotes/tn2151/_index.html
export DEVELOPER_DIR=`xcode-select -p` && /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Resources/symbolicatecrash crashlog.crash xx.dSYM
xcrun atos -o xxx.app/xxx 0x100f78000 0x000000010158bc58 # to class method
xcrun dwarfdump --uuid xxx.app/xxx # support architecture list
/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/itms/bin/iTMSTransporter -m provider -account_type itunes_connect -p password -u email
# ssh
ssh-keygen -t rsa -b 4096 -C "Comment"
# android
apktool d a.apk
adb shell pm list packages | grep com.android.systemui
adb shell pm path com.android.systemui
adb pull /system/priv-app/SystemUI/SystemUI.apk
# mitmproxy
mitmproxy -p 8080
# xcode
open $(find . -name "*.xcworkspace" -depth 1 -print -quit)
xcodebuild -arch x86_64 -sdk iphonessimulator12.2 -workspace xxx.xcworkspace -scheme xxx
xcodebuild -arch x86_64 -sdk iphonessimulator12.2 -target xxx -configuration Release -showBuildSettings
xcodebuild -list # Show (Targets, Build Configuration, Schemes)
xcodebuild -showsdks # showSDKs
xcrun simctl list # devices & runtimes
xcrun simctl list runtimes
xcrun simctl list devicetypes
xcrun simctl create "俺のiPhoneSE" com.apple.CoreSimulator.SimDeviceType.iPhone-SE com.apple.CoreSimulator.SimRuntime.iOS-11-4
xcrun simctl boot 3F611CF2-AB87-4A4E-98E7-8BA22948F2C3
xcrun simctl install 3F611CF2-AB87-4A4E-98E7-8BA22948F2C3 ~/xxxx.app
xcrun simctl launch 3F611CF2-AB87-4A4E-98E7-8BA22948F2C3 jp.minipro.app.xxx
open /Library/Developer/CoreSimulator/Profiles/Runtimes
open ~/Library/Developer/CoreSimulator/Devices
# web check
watch -n 0.5 "wget -S --spider -nv --no-cache --no-cookies --no-dns-cache --user-agent='' https://.json -a ~/Desktop/xxx.log"
# unix
nmap -sT srea.jp
lsof -i:8080 # ポートを使ってるプロセス確認
# docker
docker build ./ -t imagenamee # from Dockerfile
docker run -d -p 4649:80 imagename # Dockerfile -> Image
docker exec -it ead3b5a857f5 /bin/bash # Image -> Container
# archive
zip -r xxx.zip ./xxx.pdf -x "*.DS_Store" # for win
zipcloak xxx.zip # password
tar czf xxx.tar.gz dirx
# tmux
tmux new -s name
tmux ls
tmux a -t name # attach
tmux kill-session -t name # delete
# format
# ISO8601 2020-1-22T12:00:00+09:00