Skip to content

Instantly share code, notes, and snippets.

@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
@andriitishchenko
andriitishchenko / StadiaSWCC-c843.cfg
Created April 21, 2024 08:36
Stadia Gamepad Controller raspberry configs
input_device = "StadiaSWCC-c843"
input_driver = "udev"
input_enable_hotkey_btn = "12"
input_r3_btn = "10"
input_r_y_minus_axis = "-3"
input_l_btn = "4"
input_load_state_btn = "4"
input_r_y_plus_axis = "+3"
input_up_btn = "h0up"
input_left_btn = "h0left"
# "/opt/retropie/configs/all/retroarch-joypads/DragonRise Inc. Generic USB Joystick .cfg"
# Open config menu and enable analog controll
input_device = "DragonRise Inc. Generic USB Joystick "
input_driver = "udev"
input_r_y_minus_axis = "-4"
input_r_y_plus_axis = "+4"
input_r_x_plus_axis = "+3"
@andriitishchenko
andriitishchenko / remove.mail.attachments.sh
Created November 12, 2023 07:39
remove.mail.attachments.sh
# replase "echo" to rm -rf
find ~/Library/Mail/ -name "*.*" -type f | grep "/Attachments/" | while read -r line; do echo "$line"; done
Preparing "Install Android SDK Build-Tools 34 v.34.0.0".
Downloading https://dl.google.com/android/repository/build-tools_r34-macosx.zip
"Install Android SDK Build-Tools 34 v.34.0.0" ready.
Installing Android SDK Build-Tools 34 in /Users/<YOU_USER>/Library/Android/sdk/build-tools/34.0.0
Packages to install: - Android SDK Command-line Tools (latest) (cmdline-tools;latest)
Preparing "Install Android SDK Command-line Tools (latest) v.11.0".
Downloading https://dl.google.com/android/repository/commandlinetools-mac-10406996_latest.zip
"Install Android SDK Command-line Tools (latest) v.11.0" ready.
Installing Android SDK Command-line Tools (latest) in /Users/<YOU_USER>/Library/Android/sdk/cmdline-tools/latest
@andriitishchenko
andriitishchenko / gen_icon.sh
Created June 11, 2023 06:12
Icon generator script for custom icon sizes
#!/bin/sh
#
# Usage :
# ./gen_icon.sh images/icon-512.png "icon-" "10 25"
# Output:
# out_icons/icon-10.png
# out_icons/icon-25.png
source_image="$1"