create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
# Can be more or less complicated depending on your CLI needs. | |
export HISTCONTROL=erasedups | |
export HISTSIZE=5000 | |
shopt -s histappend | |
export VISUAL=less | |
export EDITOR=vim | |
export GIT_EDITOR="${EDITOR}" |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):
For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.
let word = "abcdefg" | |
//Using swift lib | |
String(word.characters.reverse()) //"gfedcba" | |
//Using char array and insert | |
func reverseString(wordToReverse: String) -> String { | |
guard wordToReverse.characters.count > 1 else { | |
return wordToReverse | |
} |
override function viewDidLoad() { | |
... | |
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: NSNotification.Name.UIKeyboardWillShow, object: nil) | |
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: NSNotification.Name.UIKeyboardWillHide, object: nil) | |
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillChangeFrame), name: NSNotification.Name.UIKeyboardWillChangeFrame, object: nil) | |
... | |
} |
// | |
// Macros.swift | |
// | |
// Created by Xavier Muñiz on 6/12/14. | |
import Foundation | |
// dLog and aLog macros to abbreviate NSLog. | |
// Use like this: |
NSString *uberPath = [NSString stringWithFormat:@"uber://?client_id=%@&action=setPickup&pickup[latitude]=%@&pickup[longitude]=%@&pickup[nickname]=Current Location&dropoff[latitude]=%@&dropoff[longitude]=%@&dropoff[nickname]=%@&dropoff[formatted_address]=%@&partner_deeplink=%@", | |
kUberClientId, | |
[NSString stringWithFormat:@"%f", currentLocation.coordinate.latitude], | |
[NSString stringWithFormat:@"%f", currentLocation.coordinate.longitude], | |
[NSString stringWithFormat:@"%f", [destination.coordinate.latitude doubleValue]], | |
[NSString stringWithFormat:@"%f", [destination.coordinate.longitude doubleValue]], | |
destination.name, | |
destination.address, | |
partner_deeplink_url]; | |