Skip to content

Instantly share code, notes, and snippets.

View Fiser12's full-sized avatar
🎯
Focusing

Rubén García Fiser12

🎯
Focusing
View GitHub Profile
@IsaacXen
IsaacXen / README.md
Last active November 3, 2024 04:19
(Almost) Every WWDC videos download links for aria2c.
@propertyWrapper
public struct AnyProxy<EnclosingSelf, Value> {
private let keyPath: ReferenceWritableKeyPath<EnclosingSelf, Value>
public init(_ keyPath: ReferenceWritableKeyPath<EnclosingSelf, Value>) {
self.keyPath = keyPath
}
@available(*, unavailable, message: "The wrapped value must be accessed from the enclosing instance property.")
public var wrappedValue: Value {
@vzsg
vzsg / 1_Vapor+Proto.swift
Created March 3, 2019 11:19
Using SwiftProtobuf with Vapor 3
import Vapor
import SwiftProtobuf
import Foundation
extension Request {
public func decodeMessage<M: SwiftProtobuf.Message>(_ type: M.Type = M.self) throws -> M {
let data = http.body.data ?? Data()
if http.contentType == MediaType.json {
return try M(jsonUTF8Data: data)
@IsaacXen
IsaacXen / TextField.swift
Last active March 16, 2023 12:36
NSTextField subclass with focus and blur callback.
import Cocoa
protocol TextFieldDelegate: class {
func textFieldDidBecomeFirstResponder(_ textField: TextField)
func textFieldDidResignFirstResponder(_ textField: TextField)
}
class TextField: NSTextField {
weak var firstResponderDelegate: TextFieldDelegate?
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active November 18, 2024 16:45
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Hengjie
Hengjie / tutorial.md
Last active October 27, 2024 05:26
How to passthrough SATA drives directly on VMWare ESXI 6.5 as RDMs

How to passthrough SATA drives directly on VMWare EXSI 6.5 as RDMs

There aren't many tutorials about this, the only tutorials I've found were about passing through entire PCIe cards to VMs, or refered to old ESXI versions (below 6.5) that used a more comprehensive desktop client instead of the web app. In v6.5, the web app was introduced and the desktop client was deprecated. You used to be able to setup RDMs in the desktop client, but with the introduction of the web console, this is no longer the case. This tutorial shows you how to pass SATA HDDs to the virtual machine on VMWare ESXI 6.5. This tutorial is partially based on VMWare's own KB and the now deprecated Forza IT blog post.

A word about VMWare ESXI 6.7

There is now an option while editing your VM's settings to add a New raw disk when you click `Add ha