Skip to content

Instantly share code, notes, and snippets.

View oronbz's full-sized avatar
🎯
Focusing

Oron Ben Zvi oronbz

🎯
Focusing
View GitHub Profile
@igor-makarov
igor-makarov / hook_allow_mcp.js
Created February 10, 2026 12:12
Auto-approve annoying Xcode 26.3 MCP prompts
#!/usr/bin/env osascript -l JavaScript
// Find and approve any MCP agent access dialogs in Xcode.
function run() {
var se = Application("System Events");
try { se.processes.byName("Xcode").name(); } catch (e) { return "Xcode not running."; }
var count = 0;
var windows = se.processes.byName("Xcode").windows();
@JSerZANP
JSerZANP / ContentView.swift
Created March 4, 2021 14:01
communication between native(swiftUI) and wkwebview
import SwiftUI
import WebKit
struct WebView: UIViewRepresentable {
class Coordinator: NSObject, WKNavigationDelegate, WKScriptMessageHandler {
var webView: WKWebView?
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
self.webView = webView
}
@Fonserbc
Fonserbc / SwipeInput.cs
Last active September 11, 2024 22:45
A simple swipe detector for touchscreens for Unity3D. Four cardinal directions.
using UnityEngine;
/*
* Swipe Input script for Unity by @fonserbc, free to use wherever
*
* Attack to a gameObject, check the static booleans to check if a swipe has been detected this frame
* Eg: if (SwipeInput.swipedRight) ...
*
*
*/
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active March 4, 2026 20:59
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@pixelrevision
pixelrevision / PixelPerfectCam.cs
Last active January 23, 2025 16:41
Script for unity to create a pixel locked orthogonal camera
using UnityEngine;
/**
* A camera to help with Orthagonal mode when you need it to lock to pixels. Desiged to be used on android and retina devices.
*/
public class PixelPerfectCam : MonoBehaviour {
/**
* The target size of the view port.
*/
public Vector2 targetViewportSizeInPixels = new Vector2(480.0f, 320.0f);
/**