This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function random() | |
{ | |
duration=`./ffmpeg -i "${file}" 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,// | sed 's@\..*@@g' | awk '{ split($1, A, ":"); split(A[3], B, "."); print 3600*A[1] + 60*A[2] + B[1] }'` | |
# echo "$duration" | |
min=15 | |
if [ $duration -gt $min ] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# != 2 ]; then | |
echo "usage: videoshot.sh /Users/danny/MyVideoDir /Users/danny/MyOutputDir" | |
exit -1 | |
fi | |
inputDir=$1 | |
outputDir=$2 | |
binaryEXE=./ffmpeg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. install_name_tool -id new/install/name.dylib libso.dylib //change install name | |
2. install_name_tool -change old_name new_name libso.dylib //change dependence | |
3. otool -L libso.dylib //display install name and dependence | |
4. otool -D libso.dylib //display install name of libso.dylib | |
注意: 在xcode project中写脚本修改install name 会造成sandbox之后运行奔溃,原因在于copy的时候对dylib签名,然后又去修改dylib内容(change install name),这样中破坏了之前的签名,所以会奔溃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hide: | |
defaults write com.apple.finder CreateDesktop -bool false && killall Finder | |
unhide: | |
defaults write com.apple.finder CreateDesktop -bool true && killall Finder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps ax | grep ffmpeg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lldb ffmpeg -- -i file.mp4 -c:v libx264 -an ./out.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
codesign -d --entitlements :- /Applications/Whatever.app/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[NSUserDefaults standardUserDefaults] setObject:@[@"en_US"] forKey:@"AppleLanguages"]; | |
http://www.dyndns.org/cgi-bin/check_ip.cgi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tccutil reset ScreenCapture com.company.appname //reset warnning | |
tccutil reset All com.company.appname | |
sudo xattr -d com.apple.quarantine /Applications/xxxx.app //app is damaged, ...move to track |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. install meson | |
brew install meson | |
2. set min version | |
export CFLAGS="-mmacosx-version-min=10.9" before exe 'meson ./build_dir' |
OlderNewer