Skip to content

Instantly share code, notes, and snippets.

@sandeeplearner
sandeeplearner / ExportOptions.plist
Created December 2, 2017 23:03
Example of ExportOptions.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>compileBitcode</key>
<true/>
<key>method</key>
<string>app-store</string>
<key>provisioningProfiles</key>
<dict>
@sandeeplearner
sandeeplearner / SSH test
Last active December 2, 2017 22:03
Testing SSH connection from Terminal
ssh -T [email protected] //if you are using bitbucket
ssh -T [email protected] //if you are using github
//Are you sure you want to continue connecting (yes/no)? : type yes
//Enter passphrase for key '/Users/Shared/Jenkins/.ssh/id_rsa': type in the pass phrase you used while creating RSA keys
@sandeeplearner
sandeeplearner / copy id_rsa
Created December 2, 2017 21:50
Command to copy id_rsa.pub
pbcopy < ~/.ssh/id_rsa.pub
@sandeeplearner
sandeeplearner / RSA key generation
Created December 2, 2017 21:45
Generating RSA private and public key from terminal
ssh-keygen
//Enter file in which to save the key : hit enter (no need to provide any file name)
//Enter passphrase : type in password
//Enter same passphrase again : type in password again
@sandeeplearner
sandeeplearner / Keychainimport
Created December 2, 2017 21:35
Adding items to keychain using terminal
security unlock-keychain -p Your_System_Password
security import ~/Path to your certificate/Certificates.p12 -k ~/Library/Keychains/login.keychain -P Password_used_to encrypt_certificate
@sandeeplearner
sandeeplearner / javac Command
Created December 2, 2017 20:03
java version test
javac -version
//my output looks like javac 1.8.0_131
@sandeeplearner
sandeeplearner / terminal command
Created December 2, 2017 19:40
Terminal command to copy the content of file
sudo su
//once asked for password provide your system password
pbcopy < /Users/Shared/Jenkins/Home/secrets/initialAdminPassword
class Thor : Aliens {
let flyingCapability = ThorsFlyingCapability()
func fly() {
self.flyingCapability.fly()
}
private class ThorsFlyingCapability : FlyingCapability {
override private func fly() {
//thow hammer in the air
public class Thor extends Aliens{
ThorsFlyingCapability flyingCapability = new ThorsFlyingCapability();
public void fly() {
this.flyingCapability.fly();
}
private class ThorsFlyingCapability extends FlyingCapability {
public void fly() {
//throw hammer in the air
class FlyingCapability {
func fly() {
//I can fly
}
}
class IronMan : Humans {
let flyingCapability = FlyingCapability()
func fly() {