Skip to content

Instantly share code, notes, and snippets.

View rafaelcrz's full-sized avatar

Rafael Felipe rafaelcrz

  • Netshoes
  • São Paulo, Brazil
View GitHub Profile
@rafaelcrz
rafaelcrz / ssh.md
Created July 18, 2023 14:45 — forked from EdnilsonRobert/ssh.md
Múltiplas chaves SSH para GitHub e GitLab

Múltiplas chaves SSH para GitHub e GitLab

1. Gerar Chaves SSH

ssh-keygen -t rsa -C "user@email.com" -b 4096 -f ~/.ssh/id_rsa_github
ssh-keygen -t rsa -C "user@email.com" -b 4096 -f ~/.ssh/id_rsa_gitlab

2. Copiar chaves para GitHub e GitLab

CKContainer.default().requestApplicationPermission(.userDiscoverability) { status, error in
guard status == .granted, error == nil else {
// error handling voodoo
return
}
CKContainer.default().discoverUserIdentity(withUserRecordID: recordID) { identity, error in
guard let components = identity?.nameComponents, error == nil else {
// more error handling magic
return
@rafaelcrz
rafaelcrz / eliza.swift
Created July 7, 2021 00:31 — forked from hollance/eliza.swift
The classic ELIZA chat bot in Swift.
/*
Joseph Weizenbaum's classic ELIZA chat bot in Swift.
Based on the IBM PC BASIC program from CREATIVE COMPUTING by Patricia
Danielson and Paul Hashfield, and the Java adaptation by Jesper Juul.
Run this script from Terminal:
$ swift eliza.swift
Press Ctrl-C or Ctrl-D to quit. (Or type "shut up".)