Skip to content

Instantly share code, notes, and snippets.

View elland's full-sized avatar
🎄

Igor Ranieri Elland elland

🎄
View GitHub Profile
@elland
elland / gist:0e3a146d3b63e716157f
Last active August 29, 2015 14:05
Pre-Commit Git Hook to remove Reveal.framework references.
#!/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"
# 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 / json.swift
Last active January 26, 2017 12:10
public enum JSON {
public typealias D = Dictionary<String, Any>
public typealias A = Array<Dictionary<String, Any>>
case dictionary(D)
case array(A)
// self.nil :D
NotificationCenter.default.addObserver(self, selector: #selector(self.updateVerificationStatus(_:)), name: SettingsController.verificationStatusChanged, object: self.nil)