Skip to content

Instantly share code, notes, and snippets.

@funroll
funroll / Podfile-snippet
Created June 22, 2014 04:23
CocoaPods post_install step for changing Build Active Architecture Only from Yes to No.
post_install do |installer|
installer.project.targets.each do |target|
target.build_configurations.each do |configuration|
target.build_settings(configuration.name)['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
@funroll
funroll / gist:5504098
Created May 2, 2013 18:07
Example of using sed to replace all matches in multiple files. Using OS X 10.7.5. http://stackoverflow.com/questions/10445934/change-multiple-files/10764000#comment23188250_10764000
$ cd /tmp
$ echo "foo bar baz foo foo quz" > test1
$ echo "bar bar foo bar baz foo quz foo foo" > test2
$ sed -i '.bak' 's/foo/replaced/g' test*
$ tail test1 test2
==> test1 <==
replaced bar baz replaced replaced quz
==> test2 <==
bar bar replaced bar baz replaced quz replaced replaced
self.response.out.write("hello world")