Skip to content

Instantly share code, notes, and snippets.

View agisilaos's full-sized avatar

Agisilaos Tsaraboulidis agisilaos

View GitHub Profile
@agisilaos
agisilaos / podfile
Last active July 24, 2018 17:19
Have dependencies that support Swift 3.0 & Swift 4.0 and work seamlessly together. ✨
swift4Targets = ['Target-1','Target-2','Target-3']
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if swift4Targets.include? target.name
config.build_settings['SWIFT_VERSION'] = '4'
else
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
@agisilaos
agisilaos / fix-homebrew-npm.md
Created April 22, 2017 14:05 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@agisilaos
agisilaos / gist:fea8228fc058244f94d85d173396c64b
Last active October 21, 2016 16:04
Certificate error installing cocoapods.
You tried to install cocoapods on your mac and you got an error exactly like this one?
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)
I had to get pass this error and I was asking myself: Why I couldn't download CocoaPods and what's the error is about?
After a lot of research, it is all about the certificate. You can solve this by updating the certificate.
rvm osx-ssl-certs update all
After that you need to think and update the rubygems to the latest version: