This file contains 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 | |
# Run this inside the project to replace NSLocalizedString calls with swiftgen calls in all .swift files. | |
# Do not forget to make a backup before. | |
find . -type f | grep ".swift" > swiftindex.temp | |
while IFS= read -r filename | |
do | |
grep -o "NSLocalizedString(\"[^\")]*\", comment:\s*\"\")" "$filename" > strings.temp |
This file contains 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
cat Localizable.strings | cut -d "=" -f 2 | sed "s|;||g" > spellcheck.txt |
This file contains 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
require "erb" | |
require "Shellwords" | |
require "set" | |
@dependencies = Set.new | |
@contentArray = [] | |
@migrationArray = [] | |
ARGV[0..-2].each do |filename| | |
f = File.open(filename) |
This file contains 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
#call with workspace name and scheme as arguments | |
xcodebuild -workspace $1.xcworkspace -scheme $2 clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO OTHER_SWIFT_FLAGS="-Xfrontend -debug-time-function-bodies" > buildlog.txt | |
function filteredOutput() { | |
echo $1 | |
cat buildlog.txt | \ | |
#only lines including ms | |
grep "[0-9].[0-9]ms" | \ | |
#apply filter | |
$1 | \ |
This file contains 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 | |
# exit script, if error | |
set -e | |
# defne colors | |
RED=`tput setaf 1` | |
GREEN=`tput setaf 2` | |
NOCOLOR=`tput sgr0` |
This file contains 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
# input, output, width, height, format | |
convert_tile () { | |
hh2=`/usr/local/bin/convert $1 -format "%[fx:h/2]" info:` | |
/usr/local/bin/convert $1 \( -clone 0 -roll +0+${hh2} \) +append -write mpr:cell +delete -size ${4}x${3} tile:mpr:cell $2_$5.png | |
} | |
/usr/local/bin/convert $1 -bordercolor transparent -border 15%x15% -alpha remove $1_border.png | |
convert_tile $1_border.png $1_paper 4455 3150 "A4" | |
open $1_paper_A4.png |
This file contains 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/zsh | |
wd () { | |
source "$ZSH/plugins/wd/wd.sh" | |
} | |
CHOICES=( $(wd list | cut -d ">" -f 1 | sed "s/ -//g" | sed 's/^ *//g' | sed 's/ *$//g' | tail -n +2 | awk '{printf $0 " "}') ) | |
PS3="Please enter your choice: " | |
select ANSWER in "${CHOICES[@]}"; do |
This file contains 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
desc "Run Package Tests" | |
lane :package_tests do | |
Dir.chdir("..") do | |
# iterate over packages folder | |
Dir.glob("packages/*").each do |package| | |
Dir.chdir(package) do | |
UI.message("Running tests for #{package}") | |
begin |
This file contains 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
desc "Update Github Actions" | |
lane :update_github_actions do | |
Dir.chdir("..") do | |
commitishCacheFolder = "#{ENV["HOME"]}/.githubActionsUpdater/caches/githubCommitishs" | |
tagsCacheFolder = "#{ENV["HOME"]}/.githubActionsUpdater/caches/githubTags" | |
FileUtils.mkdir_p commitishCacheFolder | |
FileUtils.mkdir_p tagsCacheFolder | |
Dir.glob(".github/workflows/*.yml") do |workflowFile| |
This file contains 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
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'parallel' | |
end | |
puts %x(bundle exec fastlane snapshot reset_simulators --force -i 16.4,17.0) | |
path = File.expand_path('~/Library/Developer/CoreSimulator/Devices/') |
OlderNewer