Skip to content

Instantly share code, notes, and snippets.

View oboje's full-sized avatar
🎯
Focusing

Igor Popov oboje

🎯
Focusing
  • New York
View GitHub Profile
@oboje
oboje / claude_3.5_sonnet_artifacts.xml
Created September 4, 2024 19:15 — forked from dedlim/claude_3.5_sonnet_artifacts.xml
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@oboje
oboje / Model.yaml
Last active August 9, 2024 21:31
Models.swift
openapi: 3.0.0
info:
title: Room Data API
version: 1.0.0
description: API specification for room and event data
paths:
/rooms/{roomId}:
get:
summary: Get room data
@oboje
oboje / FetchedResultsPublisher.swift
Created September 16, 2022 22:58 — forked from darrarski/FetchedResultsPublisher.swift
Swift-Combine-CoreData-Fetched-Results-Publisher
import Combine
import CoreData
public final class FetchedResultsPublisher
<ResultType>
: Publisher
where
ResultType: NSFetchRequestResult
{
@oboje
oboje / autopart.sh
Created August 10, 2021 11:11 — forked from trentmswanson/autopart.sh
Linux bash script to partition and format all data disks in azure
#!/bin/bash
# An set of disks to ignore from partitioning and formatting
BLACKLIST="/dev/sda|/dev/sdb"
# Base directory to hold the data* files
DATA_BASE="/media"
usage() {
echo "Usage: $(basename $0) <new disk>"
}
@oboje
oboje / chiastat
Created May 14, 2021 10:26 — forked from wallentx/chiastat
Dumping chia info to individual items to query via webserver endpoint
#!/usr/bin/env bash
source /home/your/path/to/chia-blockchain/activate
STR=$(chia farm summary | head -8)
FARM=$(chia farm summary | head -8 | sed 's/ /_/g; s/:_/=/g') #jq -Rs '{chia:split("\n")|map(split(": ")|{(.[0]):.[1]}?)}'
ACTIVE=$(pgrep -fa 'chia plots create' | wc -l)
printem() {
echo "Active_Plots=$ACTIVE"
@oboje
oboje / powerstat.sh
Created April 28, 2020 11:59
mac os input voltage stat
#!/bin/bash
b=$(system_profiler SPPowerDataType)
amp=$(echo "$b" | grep 'Amperage (mA):' | cut -d ':' -f 2 | xargs)
volt=$(echo "$b" | grep 'Voltage (mV):' | cut -d ':' -f 2 | xargs)
power=$(($amp * $volt / 1000))
echo "$b" | grep --color=never -A 1 'Battery Information:'
echo "$b" | grep --color=never -A 1 'Amperage (mA)'
echo " Total Power (mW): $power"
echo ""
@oboje
oboje / coreaudio
Last active April 7, 2020 13:39
restarting coreaudio
#!/bin/sh
sudo launchctl stop com.apple.audio.coreaudiod
@oboje
oboje / gist:9eb044a2b3db5a0a9fc2837707d07221
Created October 29, 2019 13:10
Managing iOS simulators via fastlane
irb
require 'fastlane_core/device_manager'
FastlaneCore::Simulator.delete_all_by_version(os_version: "12.4")
version: 2
# TODO: get rid of ios/ in paths
jobs:
build-and-test:
macos:
xcode: "11.0"
steps:
- attach_workspace:
@oboje
oboje / repo-rinse.sh
Created February 19, 2019 14:32 — forked from nicktoumpelis/repo-rinse.sh
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive