Skip to content

Instantly share code, notes, and snippets.

View manajay's full-sized avatar
🎯
Focusing

manajay manajay

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am manajay on github.
  • I am manajay (https://keybase.io/manajay) on keybase.
  • I have a public key whose fingerprint is 2712 0E68 1885 C2A6 B484 B367 18BC 23D1 3632 2525

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am manajay on github.
  • I am manajay (https://keybase.io/manajay) on keybase.
  • I have a public key whose fingerprint is 2712 0E68 1885 C2A6 B484 B367 18BC 23D1 3632 2525

To claim this, I am signing this object:

@manajay
manajay / get_mobileprovision_uuid.sh
Last active April 22, 2018 15:24
获取描述文件的uuid脚本
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Usage: getmobileuuid the-mobileprovision-file-path"
exit 1
fi
mobileprovision_uuid=`/usr/libexec/PlistBuddy -c "Print UUID" /dev/stdin <<< $(/usr/bin/security cms -D -i $1)`
echo "UUID is:"
echo ${mobileprovision_uuid}
@manajay
manajay / weakdance.codesnippet
Created May 10, 2018 05:14
weakdance in Objective-C
__weak __typeof(<#Type#>) weakSelf = self;
__strong typeof(weakSelf) strongSelf = weakSelf;
@manajay
manajay / jenkins_boot.sh
Last active May 10, 2018 05:15
jenkins-boot
#!/bin/sh
# sudo chmod 777 赋予权限
# chmod +x 脚本可执行
# 加入到登录项
#启动jenkins, 下面指定的路径有 jenkins.war
java -Dorg.jenkinsci.plugins.gitclient.Git.timeOut=120 -jar ~/.jenkins/jenkins.war
@manajay
manajay / dsym_uuids.sh
Last active May 10, 2018 05:16
mdfind uuid
#查询xxx uuid 的 dsym 文件
mdfind "com_apple_xcode_dsym_uuids == xxx"
@manajay
manajay / ios_cer.txt
Last active May 10, 2018 05:16
cer的知识
https://blog.csdn.net/ljb568838953/article/details/52879715
@manajay
manajay / get_uuid.sh
Last active May 10, 2018 05:17
查询描述文件的 uuid
// 方案1. 使用mac自带security命令行
security cms -D -i XXX.mobileprovision
// 方案2. mobileprovision-read命令
curl https://raw.githubusercontent.com/0xc010d/mobileprovision-read/master/main.m | clang -framework Foundation -framework Security -o /usr/local/bin/mobileprovision-read -x objective-c -
// 读取cer 公钥私钥
1. 合成 p12文件
2. 转换成pem文件
3.
@manajay
manajay / NSTextAttachment.txt
Last active May 10, 2018 05:18
NSTextAttachment 简单使用
NSTextAttachment *imageAttachment = [[NSTextAttachment alloc] init];
imageAttachment.image = image;
imageAttachment.bounds = CGRectMake(0, 0, 30, 30);
NSDictionary *imageAttributes = @{NSAttachmentAttributeName:imageAttachment};
NSAttributedString *imageAttStr = [[NSAttributedString alloc] initWithString:@"" attributes:imageAttributes];
// 创建
self.<#var#> = [NSTimer scheduledTimerWithTimeInterval:1.5
target:self
selector:@selector(<#timerMethod#>)
userInfo:nil
repeats:YES];
// 取消
[self.<#var#> invalidate];