Skip to content

Instantly share code, notes, and snippets.

Avatar

Igor Ranieri Elland elland

View GitHub Profile
View .swift
// self.nil :D
NotificationCenter.default.addObserver(self, selector: #selector(self.updateVerificationStatus(_:)), name: SettingsController.verificationStatusChanged, object: self.nil)
View json.swift
public enum JSON {
public typealias D = Dictionary<String, Any>
public typealias A = Array<Dictionary<String, Any>>
case dictionary(D)
case array(A)
View Podfile.rb
# You might be looking for something like this!
# Remember to set `PROVISIONING_PROFILE_TEAM_ID` to your team ID, it should be an alpha-num string followed by a slash `/`.
# Something like `383GG481A/`. Have fun.
post_install do |installer|
installer.pods_project.build_configurations.each do |build_configuration|
puts "Add code signing to pods"
build_configuration.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = "#{ENV["PROVISIONING_PROFILE_TEAM_ID"]}"
end
end
@elland
elland / gist:0e3a146d3b63e716157f
Last active Aug 29, 2015
Pre-Commit Git Hook to remove Reveal.framework references.
View gist:0e3a146d3b63e716157f
#!/bin/bash
git diff --cached --name-status | while read st file; do
# skip deleted files
if [ "$st" == 'D' ]; then continue; fi
# do a check only on the pbxproj file
if [[ "$file" =~ 'project.pbxproj' ]] ; then
# Remove references to Reveal.framework
sed -i '' -E 'N;s/.*Reveal.*\n(.*)/\1/' "$file"
sed -i '' -E 'N;s/(.*)\n.*Reveal.*/\1/' "$file"