Skip to content

Instantly share code, notes, and snippets.

View oboje's full-sized avatar
🎯
Focusing

Igor Popov oboje

🎯
Focusing
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 / Xcode Theme : Obsidian Code
Last active December 23, 2021 14:15 — forked from jessedc/ObsidianCode.dvtcolortheme
Xcode Theme : Obsidian Code
<?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>DVTConsoleDebuggerInputTextColor</key>
<string>0 0 0 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Menlo-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0 0 0 1</string>
@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 / iPhone_ringtone.sh
Created March 17, 2016 11:25
Create iPhone ringtone from mp3 using ffmpeg
brew reinstall ffmpeg --with-faac # Needs ffmpeg with faac encoder
ffmpeg -i <input.mp3> -ac 1 -ab 128000 -f mp4 -acodec libfaac -y -ss <beggining_second> -t <length_in_seconds> ringtone.m4r # Length can't be higher than 40 seconds
@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 / cloudSettings
Last active April 14, 2020 13:58
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-04-14T13:58:45.149Z","extensionVersion":"v3.4.3"}
@oboje
oboje / coreaudio
Last active April 7, 2020 13:39
restarting coreaudio
#!/bin/sh
sudo launchctl stop com.apple.audio.coreaudiod