Skip to content

Instantly share code, notes, and snippets.

#Установить Node.js и NPM:
brew update
brew install node@8
brew link node@8
echo 'export PATH="/usr/local/opt/node@8/bin:$PATH"' >> ~/.bash_profile
#Перезапустить терминал и проверить, что работают команды
node -v
npm -v
@amyhametov
amyhametov / install_dependencies.sh
Last active August 9, 2018 20:45
Install dependencies for building Xcode projects
#made with fun
sudo echo | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
sudo gem install xcpretty
sudo gem install fastlane
sudo gem install xcode-install
sudo gem install cocoapods
export FASTLANE_USER="your@account.todevapple"
export FASTLANE_PASSWORD="yourpasswordtoaccont"
xcversion install 9.2
@amyhametov
amyhametov / install_agent.sh
Last active July 11, 2019 13:27
Install and run gitlab-runner for iOS
#made with fun
curl --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-darwin-amd64
chmod +x /usr/local/bin/gitlab-runner
gitlab-runner install
gitlab-runner start
gitlab-runner register -n --url CI_URL --registration-token TOKEN --tag-list fastlane,cocoapods,osx_10-13,xcode_9-2 --executor shell
#fix locale for cocoapods
echo 'export LC_ALL="en_US.UTF-8"' >> ~/.bash_profile
echo 'export LANG=en_US.UTF-8' >> ~/.bash_profile
@amyhametov
amyhametov / sort-filter-nsarray.m
Created November 17, 2016 08:16
Sorting and filtering duplications
- (NSArray<NSNumber *> *)sortArray:(NSArray<NSNumber *> *)array {
NSArray<NSNumber *> *sortedArray = [array sortedArrayUsingComparator:^NSComparisonResult(NSNumber *num1, NSNumber *num2) {
return [num1 compare:num2];
}];
NSOrderedSet *orderedSet = [NSOrderedSet orderedSetWithArray:sortedArray];
NSArray *arrayWithoutDuplicates = orderedSet.array;
return arrayWithoutDuplicates;
}