Skip to content

Instantly share code, notes, and snippets.

View cardoso's full-sized avatar
🦀
https://linkedin.com/in/cardosodev

Matheus Cardoso cardoso

🦀
https://linkedin.com/in/cardosodev
View GitHub Profile
@cardoso
cardoso / Builder.swift
Created May 16, 2017 14:17
Builder Pattern
import Vapor
import Foundation
import FluentProvider
protocol Builder {
associatedtype T
typealias BuilderClosure = (Self) -> ()
@cardoso
cardoso / keybase.md
Created August 25, 2017 11:54
Keybase proof

Keybase proof

I hereby claim:

  • I am cardoso on github.
  • I am cardoso (https://keybase.io/cardoso) on keybase.
  • I have a public key whose fingerprint is 426D DC4C AC46 6D87 A570 78E1 71ED 83DF F333 87BF

To claim this, I am signing this object:

@cardoso
cardoso / RCMarkdownTest.txt
Last active September 13, 2017 02:12
RCMarkdownParserTest.txt
# success tests:
*bold* **bold**
_italic_ __italic__
~struck~ ~~struck~~
*_~bold and italic and struck~_*!! **__~~bold and italic and struck~~__**!!
![test](http://i.imgur.com/oErj2XR.png)
[test](http://rocket.chat)
# header 1
## header 2
//
// MainState.swift
// ReduxMovieDB
//
// Created by Matheus Cardoso on 2/11/18.
// Copyright © 2018 Matheus Cardoso. All rights reserved.
//
import ReSwift
Handle Index FileName Volume Group Size Loop Fade In Fade Out Defer Inst Stop Inst Duration Compound Reverb Falloff Cache Async Only Priority Stream Stereo Tracking Solo Music Vol Block 1 Block 2 Block 3
ESOUND_NONE 0 none.wav 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1
ESOUND_CURSOR_PASS 1 cursor\pass.wav 255 0 0 0 0 0 1 0 0 0 1 1 0 100 0 0 0 0 0 -1 -1 -1
ESOUND_CURSOR_SELECT 2 cursor\select.wav 255 0 0 0 0 0 1 0 0 0 1 1 0 255 0 0 0 0 0 -1 -1 -1
ESOUND_CURSOR_ERROR 3 cursor\windowopen.wav 255 0 0 0 0 1 0 0 0 0 1 0 0 100 0 0 0 0 0 -1 -1 -1
ESOUND_CURSOR_BUTTON_CLICK 4 cursor\button.wav 255 0 0 0 0 0 1 0 0 0 1 1 0 100 0 0 0 0 0 -1 -1 -1
ESOUND_CURSOR_POINT_DROP 5 cursor\pointdrop.wav 220 0 0 0 0 0 1 0 0 0 1 1 0 255 0 0 0 0 0 -1 -1 -1
ESOUND_CURSOR_SWITCH 6 cursor\windowopen.wav 220 0 0 0 0 1 0 0 0 0 1 1 0 100 0 0 0 0 0 -1 -1 -1
ESOUND_CURSOR_LEVEL_UP 7 cursor\levelup.wav 255 0 0 0 0 1 0 0 0 0 1 0 0 255 0 0 0 0 0 -1 -1 -1
ESOUND_CURSOR_LEVEL_UP_HIRELING 8 cursor\leveluphireling.wav 255 0 0 0 0 1 0 0 0 0 1 0
Sound Index FileName Volume Group Size Loop Fade In Fade Out Defer Inst Stop Inst Duration Compound Reverb Falloff Cache Async Only Priority Stream Stereo Tracking Solo Music Vol Block 1 Block 2 Block 3
0 none.wav 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 -1 -1
cursor_pass 1 cursor\pass.wav 255 0 0 0 0 0 1 0 0 0 1 1 0 100 0 0 0 0 0 -1 -1 -1
cursor_select 2 cursor\select.wav 255 0 0 0 0 0 1 0 0 0 1 1 0 255 0 0 0 0 0 -1 -1 -1
cursor_error 3 cursor\windowopen.wav 255 0 0 0 0 1 0 0 0 0 1 0 0 100 0 0 0 0 0 -1 -1 -1
cursor_button_click 4 cursor\button.wav 255 0 0 0 0 0 1 0 0 0 1 1 0 100 0 0 0 0 0 -1 -1 -1
cursor_point_drop 5 cursor\pointdrop.wav 220 0 0 0 0 0 1 0 0 0 1 1 0 255 0 0 0 0 0 -1 -1 -1
cursor_switch 6 cursor\windowopen.wav 220 0 0 0 0 1 0 0 0 0 1 1 0 100 0 0 0 0 0 -1 -1 -1
cursor_level_up 7 cursor\levelup.wav 255 0 0 0 0 1 0 0 0 0 1 0 0 255 0 0 0 0 0 -1 -1 -1
cursor_level_up_hireling 8 cursor\leveluphireling.wav 255 0 0 0 0 1 0 0 0 0 1 0 0 255 0 0 0 0 0 -1 -1 -1
2019/07/18 16:36:58 [INFO] Terraform version: 0.12.4
2019/07/18 16:36:58 [INFO] Go runtime version: go1.12.7
2019/07/18 16:36:58 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan"}
2019/07/18 16:36:58 [DEBUG] Attempting to open CLI config file: /Users/cardoso/.terraformrc
2019/07/18 16:36:58 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/07/18 16:36:58 [INFO] CLI command args: []string{"plan"}
2019/07/18 16:36:58 [DEBUG] New state was assigned lineage "e3e211d5-d9a8-b74d-ed5a-96f6aacca0ce"
2019/07/18 16:36:58 [DEBUG] checking for provider in "."
2019/07/18 16:36:58 [DEBUG] checking for provider in "/usr/local/bin"
2019/07/18 16:36:58 [DEBUG] checking for provider in ".terraform/plugins/darwin_amd64"
@cardoso
cardoso / main.js
Last active November 20, 2019 21:48 — forked from xLEWKANx/main.js
Back4App and Virgil server
const axios = require("axios");
const { JwtGenerator } = require("virgil-sdk");
const { VirgilCrypto, VirgilAccessTokenSigner } = require("virgil-crypto");
const crypto = new VirgilCrypto();
const APP_ID = "YOUR_VIRGIL_APP_ID";
const APP_KEY = "YOUR_VIRGIL_APP_KEY";
const APP_KEY_ID = "YOUR_VIRGIL_APP_ID";
const PARSE_APP_ID = "YOUR_PARSE_APP_ID";
const PARSE_REST_API_KEY = "YOUR_PARSE_REST_API_KEY";
@cardoso
cardoso / CryptoKitE2EEPlayground.swift
Created April 4, 2020 02:47
CryptoKit End-to-end Encryption
import CryptoKit
import Foundation
var protocolSalt = "Hello, playground".data(using: .utf8)!
// generate key pairs
let sPrivateKey = Curve25519.KeyAgreement.PrivateKey()
let sPublicKey = sPrivateKey.publicKey
@cardoso
cardoso / 00-start-auth-view-controller.swift
Created April 28, 2020 20:43
Adding Sign in with Apple to your iOS App
import UIKit
import AuthenticationServices
class AuthViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
setupSignInButton()
}
func setupSignInButton() {