Skip to content

Instantly share code, notes, and snippets.

@andriitishchenko
andriitishchenko / Usefullcmd.md
Created July 30, 2026 14:33
Use full cmd.md
for f in ~/Library/Developer/Xcode/UserData/Provisioning\ Profiles/*.provisionprofile; do [ -f "$f" ] || continue; echo "UUID: $(security cms -D -i "$f" 2>/dev/null | plutil -extract UUID raw -o - -) | Name: $(security cms -D -i "$f" 2>/dev/null | plutil -extract Name raw -o - -)"; done
@andriitishchenko
andriitishchenko / tcc.md
Created July 21, 2026 12:14
Example of reading TCC permissions for bundleID

Last tested: Macos 26.5.2 (25F84) jul 2026

I have and bundle_id "com.endpoint"

General SQL looks like this. It returl a lot of useless info for you:

sudo sqlite3 -markdown -header "/Library/Application Support/com.apple.TCC/TCC.db" "SELECT * FROM access WHERE client LIKE '%endpoint%';"

so this is a little formatted layout:

@andriitishchenko
andriitishchenko / check_disk_speed.sh
Last active November 19, 2025 23:53
Bash script for testing USB disk read and write speed for macOS
#!/bin/bash
# Disk info + speed test for mounted volume
# --- PARAMETERS ---
FILE="tstfile"
COUNT=1024
BS=1024k
# ------------------
VOLUME_PATH="$PWD"
@andriitishchenko
andriitishchenko / bash_task_spin.sh
Created November 19, 2025 22:13
Example of bash spinner
#!/bin/bash
spinner() {
local pid=$1
local message="${2}"
local delay=0.1
local spin='-\|/-'
local i=0
while kill -0 "$pid" 2>/dev/null; do
i=$(( (i + 1) % 4 ))
printf "\r[ %c ] ${message}..." "${spin:i:1}" >/dev/tty
@andriitishchenko
andriitishchenko / hostApp.swift
Last active August 8, 2025 23:48
Simple Endpoint Security system extension to receive events
// hostApp.swift
// Main app (host app)
/*
// entitlements:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.system-extension.install</key>
<true/>
@andriitishchenko
andriitishchenko / Arrow Flight Calculations.py
Created July 25, 2025 18:32
Arrow Flight Calculations
# https://colab.research.google.com/drive/1iUvsAFJ1hCD3qeSczQ7So6UYxWzrtiX5?usp=sharing
# === Arrow Ballistics Simulation ===
# This script simulates the flight of an arrow, first without fletching (vanes), then with fletching.
# It optimizes the launch angle to hit a target at 70m, logs all key parameters at each step, and plots the trajectory with fletching.
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import minimize_scalar
@andriitishchenko
andriitishchenko / chatgpt_conversation_removing.js
Created May 14, 2025 16:30
chatgpt conversation removing
(async () => {
const AUTH_TOKEN = "Replace with your token";
const OAI_CLIENT_VERSION = "Replace with your OAI_CLIENT";
const OAI_DEVICE_ID = "Replace with your OAI_DEVICE_ID";
// ==== Config ====
const API_BASE_URL = "https://chatgpt.com";
const PATH_CONVERSATIONS = "/backend-api/conversations";
@andriitishchenko
andriitishchenko / Title.txt
Last active January 6, 2025 19:29
api graphql imdb
{
"data": {
"__type": {
"name": "Title",
"kind": "OBJECT",
"fields": [
{
"name": "aggregateRatingsBreakdown",
"type": {
"name": "AggregateRatingsBreakdown",
@andriitishchenko
andriitishchenko / Examples.md
Last active April 30, 2024 03:50
Swift + graphQL

Query:

{
  authorById(id: 1) {
    id
    firstName
    lastName
    posts {
      id
 title
@andriitishchenko
andriitishchenko / Swift gRPC.md
Last active April 26, 2024 22:54
Swift gRPC + Python server

alt text

install protoc , protoc-gen-swift , protoc-gen-grpc-swift

brew install protobuf swift-protobuf grpc-swift grpcurl

Use examples

git clone --depth 1 --filter=blob:none --sparse https://github.com/grpc/grpc