Skip to content

Instantly share code, notes, and snippets.

View msnazarow's full-sized avatar
🍏
Ios Developing

Developer msnazarow

🍏
Ios Developing
  • Erevan
View GitHub Profile
@msnazarow
msnazarow / init.sh
Last active October 14, 2026 19:26
ForAgents: первый шаг на голом Mac
#!/bin/bash
# init.sh — первый шаг на голом Mac: Command Line Tools, Homebrew, gh, вход в GitHub, клон приватного ForAgents и запуск его bootstrap.sh.
# Запуск: curl -fsSL https://gist.githubusercontent.com/msnazarow/25ed117157219b4d0d23070467c52985/raw/init.sh | bash — публикуется в публичном gist, ссылка — в описании репозитория.
# Секретов и значений компании здесь нет; повторный запуск безопасен.
# История изменений — init.changelog.md
set -euo pipefail
REPO_SLUG="msnazarow/ForAgents"
TARGET="$HOME/ForAgents"
BREW=/opt/homebrew/bin/brew
struct TopHalfCircle: Shape {
func path(in rect: CGRect) -> Path {
var path = Path()
path.addArc(
center: .zero,
radius: 1,
startAngle: .radians(.pi),
endAngle: .zero,
clockwise: false
@msnazarow
msnazarow / Image+Trim.swift
Last active December 4, 2024 00:06 — forked from chriszielinski/Image+Trim.swift
[Swift 5] NSImage/UIImage Crop/Trim Transparency
// Image+Trim.swift
//
// Copyright © 2020 Christopher Zielinski.
// https://gist.github.com/chriszielinski/aec9a2f2ba54745dc715dd55f5718177
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#include <stdbool.h>
typedef struct str_pos {
ssize_t letter_pos;
ssize_t word_pos;
} str_pos;
@msnazarow
msnazarow / main.c
Created November 18, 2021 17:40
BigInt
#include <iostream>
#include <vector>
#include <iomanip>
#define lenBigInt 9
#define divBigInt 1000000000
// Возвращет вектор в обратном порядке, 12 345 678 987 654 123 -> 987654123 12345678
std::vector<unsigned int> parseBigIntReverced(std::string str) {
int i = str.size();
#include <iostream>
#include <vector>
#include <iomanip>
#define lenBigInt 9
#define divBigInt 1000000000
// Возвращет вектор в обратном порядке, 12 345 678 987 654 123 -> 987654123 12345678
std::vector<unsigned int> parseBigIntReverced(std::string str) {
int i = str.size();