Skip to content

Instantly share code, notes, and snippets.

View Denis411's full-sized avatar
:octocat:
Stay safe

Dennis Denis411

:octocat:
Stay safe
View GitHub Profile
@simme
simme / UITabBarController+ToggleTabBar.swift
Created January 25, 2018 15:36
Extension on UITabBarController for hiding/showing the tab bar.
extension UITabBarController {
/**
Show or hide the tab bar.
- Parameter hidden: `true` if the bar should be hidden.
- Parameter animated: `true` if the action should be animated.
- Parameter transitionCoordinator: An optional `UIViewControllerTransitionCoordinator` to perform the animation
along side with. For example during a push on a `UINavigationController`.
*/
@crisbit
crisbit / ViewWithDynamicWidthScrollingView.swift
Last active July 7, 2023 13:08
How to make a dynamic height scroll view programmatically in swift (using SnapKit)
import Foundation
class ViewWithDynamicWidthScrollingView: UIView {
convenience init() {
self.init(frame: CGRectMake(0, 0, UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height))
}
override init(frame: CGRect) {
super.init(frame: frame)
/*
Erica Sadun, http://ericasadun.com
*/
import Foundation
// --------------------------------------------------
// MARK: Foundation Interop
@EvgenyMorozov
EvgenyMorozov / Objective-C.gitignore
Created April 3, 2015 10:58
.gitignore for iOS project with CocoaPods (exclude CocoaPods files from repository).
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
@adamjohnson
adamjohnson / publickey-git-error.markdown
Last active April 18, 2024 01:00
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "your_email@example.com". Th