-
1
<meta name="apple-itunes-app" content="app-id=myAppStoreID"/>
- Supporting Associated Domains in Your App
When your app is installed, the system attempts to download and verify the association file from the domains listed in your entitlement. For each domain, the system appends /.well-known/apple-app-site-association to its name. With this new URL, the system downloads the contents and ensures the file includes the app’s application identifier. After an app successfully associates with a domain, it remains associated until the app is deleted from the device. During development, delete your app from your testing device each time you update the association file to immediately see your changes.
-
how-can-i-generate-unix-timestamps (date +%s)
-
Charles 注册码 https://zhile.io:48891cf209c6d32bf4
- ifconfig
1
netstat -nr
-
quickly-showhide-hidden-files-mac-os-x-mavericks
CMD + SHIFT + .
-
When to use Long vs long in java?
Long may be null
-
1 2 3
sudo nginx -t sudo nginx -reload sudo lsof -i:port
-
How to Install Apache on CentOS 7
/etc/systemd/system/
- How to Secure Your Server
- Using Fail2ban to Secure Your Server - A Tutorial
- Code formatting shortcuts in Android Studio for Operation Systems
<kbd>Option</kbd> + <kbd>Command</kbd> + <kbd>L</kbd>
- Android Studio Line Wrap
Right click near the line numbers for the soft wrap option to pop up.
- Spring Security Default Username, Password, Role
- @Component
Spring Component annotation is used to denote a class as Component. It means that Spring framework will autodetect these classes for dependency injection when annotation-based configuration and classpath scanning is used.
- How To Record Your Face and Screen On Your Mac
- OpenGL Tutorial
- Difference between using Makefile and CMake to compile the code
- Installing cmake with home-brew
- cmake-language(7)
- Filter (video)
- Video Encoding
- Upsampling
- Downsampling (signal processing)
- Sample-rate conversion
- Code
- Video post-processing
- Digital image processing
- Video processing
- Sampling (signal processing)
- Sampling (signal processing)
- 1分钟读懂直播和音视频通话的区别
- CNAME record
- Domain Name System
- OBS推流(腾讯云)
- XSplit
- VLC Media Player
- Trying to Capture iPhone Audio AND Microphone
- Vranish Cache
- Varnish
- Varnish (software)
- CDN
- Computer cluster
- Load balancing (computing)
- Memory Layout of C program
1 2
gcc memory-layout.c -o memory-layout size memory-layout //print the size of the sections in an object file
- Understanding Memory Layout
- Data segment
- Code segment
- Memory Segments
- 深入理解Symbol
- MachO
- 深入浅出iOS编译
- C Language: what does the .mm extension stand for?
- Capstore
- Objective-C implicit conversion loses integer precision ‘NSUInteger’ (aka ‘unsigned long’) to ‘int’ warning
- When to use NSInteger vs. int
- Opening the Settings app from another app
- Concurrent Programming: APIs and Challenges
- Concurrency Programming Guide
- Core Animation Programming Guide
- View Programming Guide for iOS
- ViewTransitions
- Using Responders and the Responder Chain to Handle Events
- Enable Adobe Flash Player in the Safari web browser
- 备案查询
- 网站备案
- Download a single folder or directory from a GitHub repo
replace tree/master with trunk
- How can I run git push/pull commands with SSH verbose mode?
- Why do I get “svn: E120106: ra_serf: The server sent a truncated HTTP response body” error?
- subversion
- svnbook
- SVN and @ characters: peg revision is not allowed here
To work around that, all you need to do is add an @ symbol at the end of the filename, like smart-googleplus1@2x.png@
-
SVN : missing files in local copy
1
svn ls -R | xargs svn up
- CocoaPods-create a pod
- CocoaPods-Guides
- pod to the CocoaPods Trunk
- Private Pod
- Specs and the Specs Repo
- The Podfile
- SSO
- iOS Storage Best Practices
- iOS Data Storage Guidelines
- File System Programming Guide
- App Sandbox Design Guide
- Static variable
- Static local variables
- Live Screen Broadcast with ReplayKit
- Go Live with ReplayKit
- SpriteKit
- ComponentKit
- Create your first iPhone game from scratch, no coding experience required.
- What is video bitrate and why it matters?
- How to check Resolution, bitrate of video in iOS
- OS: get video duration and thumbnails without playing video
- epdf.pub
- signal and system
- khanacademy
- geogebra
- desmos
- Variadic Macros
- 性能优化-allocations
- 性能优化-SystemTrace
- 性能优化-Timeprofiler
- Centering a view in its superview using Visual Format Language
- C: incomplete definition of type ‘struct date’ error
- Recursive (Re-entrant) Locks
- When to use recursive mutex?
- How to update a forked repo with git rebase
- Sync your Git Fork to the Original Repo
- Java version history
- Maven Java Compiler Version
- Setting the Java Version in Maven
- Do Java 1.9 and Java 9 refer to the same thing?
- Directories used by the IDE to store settings, caches, plugins and logs
- Deep dive into .idea folder in Android Studio
- application properties
- Access mysql remote database from command line
1 2 3
mysql -u {username} -p'{password}' \ -h {remote server ip or name} -P {port} \ -D {DB name}
- SHOW GRANTS(MariaDB)
- ALTER USER
- What is the difference between Docker and Vagrant? When should you use each one?
- Vagrant
- Installing and Using the MySQL Launch Daemon
/usr/local/mysql-8.0.21-osx10.13-x86_64/ with a symlink to /usr/local/mysql
- Determine which MySQL configuration file is being used
1
which mysqld
- Location of my.cnf file on macOS
1
mysql --verbose --help | grep my.cnf
- Using Option Files
- MySQL ‘create schema’ and ‘create database’ - Is there any difference
- Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set. ` spring.jpa.database=mysql `
- Java Connector Using Gradle
- https://www.quora.com/What-is-the-relationship-between-MySQL-and-MariaDB
- useSSL=false&allowPublicKeyRetrieval=true
- java.sql.SQLException: Access denied for user ‘’@’localhost’ (using password: NO) with Spring+JPA+ MySql
spring.datasource.url=jdbc:mysql://localhost:3306/taskdb?user=springuser&password=1Qazxsw@
- Versioning a REST API With Spring Boot and Swagger
- External Configgog
- snakeyaml
- JNDI
- Deploying Spring Boot Applications
- Vim Searching
/ ? n/N
- Vim Completion
ctrl p/n x/l/k w/u
- Redis Quick Start
1
redis-server /etc/redis.conf
- Redis Command
1
redis-cli ping
- Redis Config
1 2
requirepass "hello world" maxmemory 2mb
- redis-cli
1 2
redis-cli -h host -p port -a pass ping AUTH password
- how to check redis instance version?
1
redis-server --version
- Versioning RESTful Services With Spring Boot
Implementing Beans for Versioning
class StudentV1 | StudentV2
URI Versioningv1/student v2/student
Request Parameter Versioning?version=1 ?version=2
@GetMapping(value = "/student/param", params = "version=1")
(Custom) Headers Versioningheaders=[X-API-VERSION=1]
@GetMapping(value = "/student/header", headers = "X-API-VERSION=1")
-
Media Type Versioning (a.k.a “Content Negotiation” or “Accept Header”)
headers[Accept=application/vnd.company.app-v1+json]
@GetMapping(value = "/student/produces", produces = "application/vnd.company.app-v1+json")
- https://stackoverflow.com/questions/23735149/what-is-the-difference-between-a-docker-image-and-a-container
- Docker 国内镜像
- Configure docker to use faster registries in China
- 清华大学开源软件镜像站
- 阿里云官方镜像站
- 中国大陆开源镜像站汇总
-
How to Completely Uninstall Xcode and Clear All Settings
remove these files
/Applications/Xcode.app
/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
~/Library/Application Support/Xcode
~/Library/Developer/Xcode
~/Library/Developer/CoreSimulator
-
1
git log A...B
1
man git-rev-parse
1
man git-diff
- git - remote add origin vs remote set-url origin
git remote add => ADDS a new remote. git remote set-url => UPDATES existing remote.
- Difference between git branch –set-upstream-to vs git remote add origin
In order to set the remote tracking branch with
set-upstream-to
, you need to define a remote repo. that doesn’t mean all the branches from that remote are tracked by a local branch. That is where git branch –set-upstream-to can come into play. -
1
sudo xcode-select --switch /Applications/Xcode_11_3.app/Contents/Developer/
-
1
ls -la /usr/share/locale | grep en_US
update Oh-My-zsh
1
upgrade_oh_my_zsh
-
How can I switch word wrap on and off in Visual Studio Code?
Option + Z
-
Xcode: Is it possible to ‘Open Quickly’ the right pane of the Assistant Editor?
-
Find (and kill) process locking port 3000 on Mac
1
netstat -vanp tcp | grep port
1
sudo lsof -i tcp:port
-
SDKMAN: JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME
-
Using Xcode Configuration (.xcconfig) to Manage Different Build Settings
-
How to Use Xcode Targets to Manage Development and Production Builds
-
LSApplicationQueriesSchemes
Specifies the URL schemes the app is able to test using the canOpenURL: method.
- Telegram Animated Stickers
- Adding a Custom Font to Your App
- Add fonts you gonna use to resource fonts folder
Fonts provided by application
(Info property list key)
-
[TBD] To Be Discussed
-
A
big-endian
ordering places the most significant byte first and the least significant byte last alittle-endian
ordering does the opposite Today, however,big-endianness
is the dominant ordering in networking protocols(IP, TCP, UDP) Conversely,little-endianness
is the dominant ordering for processor architectures (x86, most ARM implementations) and their associated memory -
Xcode “Build and Archive” from command line
1 2 3 4 5
/usr/bin/xcrun -sdk iphoneos PackageApplication \ -v "${RELEASE_BUILDDIR}/${APPLICATION_NAME}.app" \ -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" \ --sign "${DEVELOPER_NAME}" \ --embed "${PROVISONING_PROFILE}"
-
Sometimes, the Chinese message that sended to server is mojibake
.forceWebsockets(true)
- Asset Catalog Format Reference
- Load Gif
- How to load GIF image in Swift?
- Reducing Your App’s Size
- MurmurHash
- Binary-code compatibility
- 64 Bit Calculator
- Center NSTextAttachment image next to single line UILabel
- NSAttributedString with image attachment and NSTextTab, text not aligned
- CapHeight
- Ascender (typography)
- Descender
- What is the effect of extern “C” in C++?
extern “C” makes a function-name in C++ have ‘C’ linkage (compiler does not mangle the name) so that client C code can link to (i.e use) your function using a ‘C’ compatible header file that contains just the declaration of your function. Your function definition is contained in a binary format (that was compiled by your C++ compiler) that the client ‘C’ linker will then link to using the ‘C’ name.
- AES
- Salt (cryptography)
- RSA
- Denial-of-service attack
- Initialization vector
- Block cipher
- Deterministic algorithm
- Telegram 之 MTProtoKit 架构分析
- Difference Between __kindof and not Using it in Objective-C
- C Language: what does the .mm extension stand for?
- Inline function
- Bitmap
- Vector graphics
- Raster graphics
- Greek alphabet
- Apple Open Source
- __bridge vs __bridge_transfer vs __bridge_retained
- C Question: (const void *) vs (void *)
-
https://stackoverflow.com/questions/6731545/when-does-a-view-or-layer-require-offscreen-rendering
- Getting Pixels onto the Screen
- A Complete Guide to Flexbox
- CSS values and units
- MDN Web Docs
- 深入理解RunLoop
- Using Signposts for Performance Tuning on iOS
- Measuring Performance Using Logging
- Find out if Character in String is emoji?
- How do you create a remote Git branch?
1 2
git config --global push.default current git push -u
1 2
git checkout -b <branch-name> git push <remote-name> <branch-name> | git push --set-upstream <remote-name> <local-branch-name> | git push <remote-name> <local-branch-name>:<remote-branch-name>
```sh git push origin HEAD:refs/heads/foo
- What’s inside AsyncDisplayKit for iOS
- ways to to speed up your UI on iOS
- Processor affinity
- Making custom UISwitch (Part 1)
- Sqlite Statement Parameters
- Write-Ahead Logging
- PRAGMA Statements
- wiktionary
- Roadmaps to Unicode®
- Understanding Scroll Views
- Why is reading not thread-safe?
- Thread Safety
- View-Layer Synergy
- AudioServices
- TapticEngineHapticSignals
- Rounding a double value to x number of decimal places in swift
- Coding Terminology
- In Swift, When using “[weak self] in”, should I double up on it when nested inside another closure [duplicate]
the answer is no
- How to see the changes in a Git commit?
1
git diff COMMIT~ COMMIT
-
[http://www.myfirstfont.com/glossary.html]
- Duplicated Class
If duplicate classes is singleton, program behavior is undefined
When your dynamic dependency is built, it must resolve its static dependencies at build time, so when yur dylib is finished building it contains all of the symbols from its static dependencies. If you then share dependencies with another dylib or your main app, you end up with duplicate symbols.
Your dynamic library’s dependencies must also be dynamic. In general, avoid mixing static and dynamic dependencies and subdependencies.
Static frameworks should not be linked to the targets if inherit! search_paths is set
-
Is it a static or dynamic framework?
1
file Mach-O executable
-
1
lipo -info
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// 到目录下查看信息 lipo -info AgoraRtcEngineKit Architectures in the fat file: AgoraRtcEngineKit are: armv7 x86_64 arm64 // 分离arm64 ipo -thin arm64 AgoraRtcEngineKit -output AgoraRtcEngineKit_64 // 继续分离内部的.o文件 ar -x AgoraRtcEngineKit_64 // 最后生成libagora_rtc_sdk.a-arm64-master.o和libmedia_engine.a-arm64-master.o // 将libagora_rtc_sdk.a-arm64-master.o和libmedia_engine.a-arm64-master.o合成AgoraRtcEngineKit_arm64 libtool -static -o AgoraRtcEngineKit_arm64 *.o // 将多个架构合并 lipo -create AgoraRtcEngineKit_arm64 AgoraRtcEngineKit_i386 -output AgoraRtcEngineKit
- Build Setting
- Build Settings
1 2
xcodebuild -showBuildSettings xcodebuild -showsdks [-json]
Perform Single-Object Prelink [GENERATE_MASTER_OBJECT_FILE] Prelink libraries [PRELINK_LIBS]
Preserve Private External Symbols [KEEP_PRIVATE_EXTERNS]
1
xcrun size -x -l -m a.out
thread 0 crashed with three question mark
Embedding Frameworks In An App
1
2
3
4
# list all of the libraries dynamically linked to a binary
otool -L <PathToArchive>/Products/Applications/<AppName>.app/<AppBinary>
otool -L BetChat-iOS-Hockeyapp-Internal\ 2020-7-15,\ 4.26\ PM.xcarchive/Products/Applications/BetChat.app/BetChat
gcc Options for Directory Search
How to Setup Configurations and Schemes in XCode
1
2
3
4
5
6
7
# display name list (symbol table)
# -n Sort numerically rather than alphabetically.
# -m Display the N_SECT type symbols (Mach-O symbols) as (segment_name, sec-
# tion_name) followed by either external or non-external and then the symbol
# name. Undefined, common, absolute and indirect symbols get displayed as
# (undefined), (common), (absolute), and (indirect), respectively
nm -nm
- No space left on device - Centos 7
-
Cannot find what is filling up disk space /dev/vda1 is 100% full
- Assembly Language
most compilers convert source code directly to machine code An assembly language is a low-level programming language designed for a specific type of processor. It may be produced by compiling source code from a high-level programming language (such as C/C++) but can also be written from scratch. Assembly code can be converted to machine code using an assembler.
-
How to check if port is in use in
1 2
sudo lsof -i -P -n | grep LISTEN sudo netstat -tulpn | grep LISTEN
-
How To Install the Apache Web Server on CentOS 7
1 2 3
sudo yum install httpd sudo yum enable httpd sudo yum start httpd
-
Configure server port when running jar
1 2
java -Dserver.port=8888 -jar myApplication.jar java -jar jenkins.war --httpPort=9090
-
How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04
-
How to find out what profile was used for building *.ipa file?
-
How to check open ports in Linux using the CLI
1 2 3
sudo netstat -tulpn | grep LISTEN cat /etc/services grep -w '80/tcp' /etc/services
-
How can I merge two commits into one if I already started rebase?
1
git rebase -i commmitid
-
I ran into a merge conflict. How can I abort the merge?
1
git merge --abort
-
1 2
git config --global http.proxy socks5://127.0.0.1:1080 git config --global https.proxy socks5://127.0.0.1:1080
sudo vim
/etc/hosts
151.101.72.249 http://global-ssl.fastly.Net 192.30.253.112 http://github.com - homebrew下载过慢问题
替换/还原brew.git仓库地址
1 2
cd "$(brew --repo)" git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
替换/还原homebrew-core.git仓库地址
1 2
cd "$(brew --repo)" git remote set-url origin https://github.com/Homebrew/brew.git
1 2
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
1 2
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://github.com/Homebrew/homebrew-core.git
替换/还原homebrew-bottles
1
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
-
连手机热点,哈哈哈
-
Build and Run Telegram-iOS v7.3 in Simulator with Bazel
1
sed -i'' -e 's/Telegram development/Telegram distribution/g' Makefile
1 2 3 4 5 6 7 8
CODESIGNING_DATA_PATH="build-system/fake-codesigning" \ CODESIGNING_CERTS_VARIANT="distribution" \ CODESIGNING_PROFILES_VARIANT="appstore" \ COMMIT_ID=`git rev-parse HEAD` \ BUILD_NUMBER=`git rev-list --count HEAD` \ LOCAL_CODESIGNING=1 \ IGNORE_XCODE_VERSION_MISMATCH=1 \ sh build-system/verify.sh make bazel_project_noextensions
-
如果你有想要拓展视野的意愿和需求,我的建议是一定要迅速付诸实践 RN 虽然还在移动开发的界限内,但是他背后所一脉相承的React思想,单项信息流动,组件化的UI构建方式,确实软件开发中所共通的设计思维 接触React也能让你一撇前端开发的门径和现状
逆向工程有助于理解计算机原理的深层实现,可以让你再更底层来审视高层级API的设计和逻辑,或者在日常工作的调试中更得心应手 AR和VR紧跟潮流,有希望成为下一个爆发点,会有机会创造出下一个人尽皆知,让人一举成名的应用。
相比于苦恼哪个方向,其实最重要的是这份学习和进步的态度
说句实话(或则说是丧气话),我们都不是那种顶尖开发者,也很少有机会去创造出所谓的颠覆世界的东西。 其实除非天资炳然,否则包括你我在内的绝大多数人总是会庸碌走完一生。但是这并不妨碍我们有所追求,也不应该成为我们裹足不前的进口。 如果保持上进心,那我们总需要有办法更进一步,而想到这件事最简单的方式就是不断学习和自我提升
其实相比学什么,更重要的是行动起来。
万事开头难,思考再多也不过是空想,只要开始就会有收获 不论方向,选定一个(或者几个),然后尽快着手走下去吧
在软件开发领域有一个很有意思的现象,那就是顶尖的牛人一定不会是那种只精通一项技术的人。 AFNetworking的作者 @matt在转向iOS之前就是著名的Buby开发者 Swift的创造者Chris Lattner已经从Apple离开寻找新的挑战
一个人在某项技术上总会遇到成长的瓶颈,而与其在这个瓶颈中死磕硬碰,可能有时候不如从其他方向进行“迂回”,并从其他的技术中开阔眼界、汲取经验,可能会更加有效。
如果你再折腾iOS布局的时候纠结于自己计算frame还是使用autolayout, 如果你接触过Android开发的话,就会知道我们还有很多相对布局的方式;更近一步,如果你接触过一些用来布局的DSL(Domain-specific language),那么你可能就会想到将iOS已有的API与之结合,来创造出更简单易用的布局方式,这种举一反三,互相印证,融会贯通的能力,正是从中级开发者迈向高级开发者所需要的能力;而现在iOS上很多出色的布局框架,也正是结合了各种思想后的成果
横向的视野在纵向的深入上也是至关重要的。 如果在未来三年成为iOS行业的顶尖开发者,在深入本行的同时,也一定要保证接触技术的广度。 这种兴趣的“转移”早看起来似乎和精通某一门具体的技术有些违背,但是他会在你遇到瓶颈的时候为你提供另外的思路,让你有机会能够跳出当前的维度和上下文来思考问题,并且最终找到解决的途径
一个三年或者五年以上的从业者应该不仅仅能够熟练使用现有的API,更应该具有在创造的能力。 人的本质其实就是使用工具,而文门在面向最终产品的开发时,所做的本质也是使用已有的工具来完成项目。在创造产品的同时,如果能尽量多思考如何去创造新的工具,就会让整个社区的生产里得到提高。 如果我说我们现在的所有可用工具和已经实现的算法框架是一池子水的话,那么我想,尽量利用和扩展自己的知识,并努力为这池水添加一杯或者两杯新水,应该成为一个想要迈向高级开发者的从业人员的目标
-
SSL Certificate Pinning Under the Hood
Associating a host with its certificate or public key once you know a host’s certificate or public key, you pin it to the host
In other words, you config the app to reject all but one or a few predefined certificates or public keys whenever the app connects to the server, it compares the server certificate with the pinned certificates or public keys, if and only if they match, the app trusts the server and establishes the connection
-
You and input sources and timer sources The runloop then watches them for activity
-
Once a mode is added to the set of common modes, it can not be removed
__CFRunLoopDoBlocks, CFRunLoopPerformBlock, _CFRunLoopSourceWakeUpRunLoops
-
resource A and resource B are used by process X and process Y X starts to use A X and Y try to start using B Y ‘wins’ and gets B first now Y needs to use A A is locked by X, which is waiting for Y
-
Resource-Allocation Graph
- math
- math
- difference between cc, gcc and g++cc