Skip to content

Instantly share code, notes, and snippets.

@zoltan-magyar
zoltan-magyar / xcode-claude-code-third-party.md
Last active July 30, 2026 00:26
Xcode Claude Code integration with third-party APIs

Setting Up Xcode Claude Code with Third-Party API Endpoints

This guide explains how to configure Xcode's built-in Claude Code integration to work with third-party API endpoints instead of the official Anthropic API. You need macOS 26.2+ and Xcode 26.3+ for the Claude Code integration.

Step 1: Install Claude Code component in Xcode

You need to first install Xcode's own Claude Code instance, with its own Claude Code binary.

Xcode Settings -> Intelligence -> Anthropic -> Claude Agent -> press Get button

@andrewfraley
andrewfraley / gist:4a6ee82b027f41e649242120853ec669
Last active June 2, 2026 21:35
Definitive guide for configuring MacOS keyboard shortcuts on KDE Plasma 6.x+

Configuring MacOS keyboard shortcuts on KDE Plasma 6

This guide will cover the best way to get MacOS keyboard shortcuts on KDE Plasma 6

Reset existing shortcuts

You've probably been messing with your shortcuts already. I would recommend returning them to their defaults to ensure everything here works as intended.

  • KDE System Settings -> Keyboard -> Shortcuts
  • Click the Defaults button, then the Apply button
@palashmon
palashmon / Readme.md
Last active June 20, 2026 23:10
Creating JSDoc `@types` for Different Data Types in JavaScript
@eylenburg
eylenburg / msoffice_in_linux.md
Last active August 17, 2026 05:50
Installing Microsoft Office in Linux

Step by step guide: How to install Microsoft Office in any Linux distribution

There are multiple options how to install MS Office on Linux.

VM-based - Integrate Windows apps running in a Windows virtual machine as native-looking in Linux

  1. LinOffice - Microsoft Office Launcher for Linux, my own fork of Winapps which is focused on only running Microsoft Office, with some Office-specific improvements over Winapps and a fully automated setup. Eventually I would like to create a GUI for it. Decribed below
  2. Winapps, based on KVM, QEMU, Docker/Podman and FreeRDP. Still actively maintained (getting Github commits). Decribed below
  3. Cassowary, based on KVM, QEMU, libvirt/virt-manager, and FreeRDP. Last release in Feb 2022 and seems to be abandoned.
@petrprikryl
petrprikryl / function.py
Last active June 20, 2025 06:49
Django table function
#############################
# Table Functions
#############################
'''
CREATE OR REPLACE FUNCTION get_user(INTEGER DEFAULT NULL, VARCHAR DEFAULT NULL)
RETURNS TABLE(
id INTEGER,
user_id INTEGER,
one_id INTEGER,
username VARCHAR,
@micheltlutz
micheltlutz / Border in TableView Sections
Last active August 23, 2024 09:39
Apply border around tableView Sections
/**
Extension for UITableViewController or UIViewController as you prefer
*/
extension UITableViewController {
func colorSection(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
let cornerRadius: CGFloat = 0.0
cell.backgroundColor = UIColor.clear
let layer: CAShapeLayer = CAShapeLayer()
let pathRef: CGMutablePath = CGMutablePath()
//dx leading an trailing margins
@bacilla-ru
bacilla-ru / zeal_docsets_update.py
Last active November 13, 2021 18:35
Update installed Zeal (https://github.com/zealdocs/zeal) docsets.
#!/usr/bin/env python3
import json
import os
import os.path
import shutil
import sys
import tarfile
import tempfile
import typing
import xml.etree.ElementTree as ET
@Chrisb616
Chrisb616 / catchWarningsAndErrors.sh
Created October 3, 2016 18:28
Catch Warning and Error Comments During Build
TAGS="TODO:|FIXME:"
ERRORTAG="ERROR:"
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$|($ERRORTAG).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/" | perl -p -e "s/($ERRORTAG)/ error: \$1/"
@mattt
mattt / uiappearance-selector.md
Last active December 2, 2025 01:55
A list of methods and properties conforming to `UIAppearance` as of iOS 12 Beta 3

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./*     | \
  sed 's/NS_AVAILABLE_IOS(.*)//g'     | \
  sed 's/NS_DEPRECATED_IOS(.*)//g'    | \
  sed 's/API_AVAILABLE(.*)//g'        | \
  sed 's/API_UNAVAILABLE(.*)//g'      | \
 sed 's/UI_APPEARANCE_SELECTOR//g' | \
@helena
helena / TrySamples.scala
Last active July 13, 2021 15:03
Try introduced in Scala 2.10.0
// Start by adding these
import scala.util.{ Try, Success, Failure }
/**
* Sample runs code that raises the exception:
* java.lang.ArithmeticException: / by zero
*/
object Sample {
def main(args: Array[String]): Unit = {