Skip to content

Instantly share code, notes, and snippets.

View anirudhamahale's full-sized avatar

Anirudha Mahale anirudhamahale

View GitHub Profile
@alejandro-martin
alejandro-martin / multiple-ssh-keys-git.adoc
Last active October 26, 2025 07:39
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

@z5ottu
z5ottu / uibutton.3d.transform.swift
Created January 4, 2016 11:40
Swift: UIView 3d transform animation style: horizontal flip
let layer = sender.layer
var rotationAndPerspectiveTransform : CATransform3D = CATransform3DIdentity
rotationAndPerspectiveTransform.m34 = 1.0 / -1000
rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, CGFloat(M_PI / 0.3), 0.0, 1.0, 0.0)
layer.transform = rotationAndPerspectiveTransform
UIView.animateWithDuration(2.0, animations: {
layer.transform = CATransform3DIdentity
})
@nvkiet
nvkiet / [Swift] Switch-RootViewController
Last active January 28, 2025 07:46
Switch root view controller
func switchRootViewController(rootViewController: UIViewController, animated: Bool, completion: (() -> Void)?) {
if animated {
UIView.transitionWithView(window, duration: 0.5, options: .TransitionCrossDissolve, animations: {
let oldState: Bool = UIView.areAnimationsEnabled()
UIView.setAnimationsEnabled(false)
self.window!.rootViewController = rootViewController
UIView.setAnimationsEnabled(oldState)
}, completion: { (finished: Bool) -> () in
if completion {
completion!()
@jacobbubu
jacobbubu / ioslocaleidentifiers.csv
Created February 15, 2012 14:41
iOS Locale Identifiers
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)