Skip to content

Instantly share code, notes, and snippets.

View ksm's full-sized avatar
🏔️

Karol S. Mazur ksm

🏔️
View GitHub Profile
@ksm
ksm / xcode-mcpbridge.md
Last active February 21, 2026 01:24
Xcode MCP Remote Access Options

Xcode MCP Remote Access Options

Options for connecting to Xcode's MCP server from an agent on a different machine on your network.

Background

  • xcrun mcpbridge: Apple's built-in MCP bridge that connects to Xcode. Uses stdio only, must run on the Mac where Xcode is installed.
  • Xcode MCP Tools: Enable in Xcode → Settings → Intelligence → Model Context Protocol.

@ksm
ksm / nyan-cat-hd.gif
Last active February 7, 2021 03:38
🌌
nyan-cat-hd.gif
@ksm
ksm / machine.js
Created September 29, 2020 16:23
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
import React, { Component } from "react";
import Board from "./Board";
export default class Game extends Component {
constructor(props) {
super(props);
this.state = {
xIsNext: true,
stepNumber: 0,
history: [{ squares: Array(9).fill(null) }],

Keywords

👨‍💻 Technologies I Use Day-to-Day
JavaScript, Flow for JavaScript, Ruby, Swift
React, React Native, Ruby on Rails, Apollo, GraphQL
Jest, RSpec
VSCode, Xcode, Git
Yarn, CocoaPods, Carthage

| 🎓 What I'd Like To Get Better At or Learn |

@ksm
ksm / DEPENDENCIES.md
Last active February 14, 2019 17:49
A sample DEPENDENCIES.md file

Use this file to track all dependencies required by this project.

Added via Carthage

Alamofire

  • Added because of its MultipartFormData implementation
  • License: MIT

Added via Drag & Drop

@ksm
ksm / gist:593faea8f0ab408dc071eea4e05c8dc1
Created December 20, 2018 16:40
Carthage failing build log for GRDB.swift
*** xcodebuild output can be found in /var/folders/pz/zn0ztb8n4kl2ts0cd4thqxxh0000gq/T/carthage-xcodebuild.vWS3Sz.log
*** Building scheme "GRDBiOS" in GRDB.xcworkspace
*** Building scheme "GRDBCipheriOS" in GRDB.xcworkspace
*** Building scheme "GRDBCustomSQLiteiOS" in GRDB.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/karol/Desktop/portfolio-ios/Carthage/Checkouts/GRDB.swift/GRDB.xcworkspace -scheme GRDBCustomSQLiteiOS -configuration Release -derivedDataPath /Users/karol/Library/Caches/org.carthage.CarthageKit/DerivedData/10.1_10B61/GRDB.swift/v3.6.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/pz/zn0ztb8n4kl2ts0cd4thqxxh0000gq/T/GRDB.swift SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/karol/Desktop/portfolio-ios/Carthage/Checkouts/GRDB.swift)
This usually indicates that project itself faile
@ksm
ksm / UIBarButtonItem+Closure.swift
Last active February 10, 2025 00:00 — forked from BeauNouvelle/UIBarButtonItem Closure 1.swift
Slightly improved version of Beau Nouvelle's UIBarButtonItem closure extension. I hid all the helper classes within the extension and made them private, so as not to pollute the global namespace. Original article: https://medium.com/@BeauNouvelle/adding-a-closure-to-uibarbuttonitem-24dfc217fe72
import Foundation
import UIKit
public extension UIBarButtonItem {
public typealias TargetClosure = (UIBarButtonItem) -> ()
public convenience init(title: String?, style: UIBarButtonItem.Style = .plain, closure: @escaping TargetClosure) {
self.init(title: title, style: style, target: nil, action: nil)
targetClosure = closure
#!/bin/bash
#
# Written by Corey Haines
# Scriptified by Gary Bernhardt
#
# Put this anywhere on your $PATH (~/bin is recommended). Then git will see it
# and you'll be able to do `git churn`.
#
# Show churn for whole repo:
# $ git churn
@ksm
ksm / Embedding.swift
Last active June 14, 2018 18:30
Lets a view controller embed a child view controller.
import UIKit
protocol Embedding: class {
var embeddedViewController: UIViewController? { get set }
}
enum EmbeddingAnimation {
case none
case flipFromLeft
case crossDissolve