Skip to content

Instantly share code, notes, and snippets.

View tomas-rampas's full-sized avatar
🎯
Focusing

Tomas Rampas tomas-rampas

🎯
Focusing
  • Prague, Czech Republic
  • 05:28 (UTC +02:00)
View GitHub Profile

Claude Code Sub-Agent Delegation Setup

1. Create the Plan Agent (Opus)

Create file: ~/.claude/agents/plan-agent.md

---
name: plan-agent
description: Use proactively for high-level planning, architecture decisions, project strategy, and complex problem decomposition. Specialist for strategic thinking and system design using advanced reasoning capabilities.
@tomas-rampas
tomas-rampas / coverage.json
Last active May 5, 2025 18:46
Rust Code Coverage
{"label":"Coverage","message":"57%","schemaVersion":1,"color":"f44336","namedLogo":"rust"}
<#
.SYNOPSIS
Transfers data from small tables (5MB or less) between databases using dbatools.
.DESCRIPTION
This script uses dbatools to copy data from small tables (defined as 5MB or less)
from a source database to a destination database. It identifies small tables based
on their size, handles dependencies, and provides detailed logging.
.PARAMETER SourceServer
# ..\Export-CompleteDatabase-Async.ps1 -ServerInstance "YourServer" -DatabaseNames "DB1","DB2","DB3" -OutputPath "C:\DatabaseScripts" -MaxConcurrentJobs 3
# The script handles system objects by default (with the -IncludeSystemObjects switch to include them if needed)
# and provides comprehensive coverage of all SQL Server database objects.
# Parameters for the SQL Server connection and output location
param (
[string]$ServerInstance = "YourServerName",
[string[]]$DatabaseNames = @("DB1", "DB2"), # Provide database names to script
[string]$OutputPath = "C:\DatabaseScripts", # Where to save the scripts
@tomas-rampas
tomas-rampas / Get-CompassListOfSessions.ps1
Last active October 26, 2024 14:41
Gets List of CompassFx classes per month and year all all for given year
# Define the user agent string
$UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0"
# Define the list of all months
$allMonths = @("january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december")
function Get-CompassWebPage {
param (
[Parameter(Mandatory = $true)]
[string]$Uri,
@tomas-rampas
tomas-rampas / iqfeed_hist.py
Last active September 16, 2023 14:32
IQFeed Historical data downloader
import socket
# https://ws1.dtn.com/IQ/Guide/
def read_historical_data_socket(sock, recv_buffer=4096):
"""
Read the information from the socket, in a buffered
fashion, receiving only 4096 bytes at a time.
@tomas-rampas
tomas-rampas / code-coverage.json
Last active July 27, 2025 13:30
code-coverage.json
{"schemaVersion":1,"label":"Unit Test Coverage","message":"64.33%","color":"brightgreen"}
@tomas-rampas
tomas-rampas / Linux_CLI_CheatSheet.md
Created August 6, 2022 17:24
List of some useful Linux CLI commands
Command Description
 man <tool> Opens man pages for the specified tool.
<tool> -h Prints the help page of the tool.
apropos <keyword> Searches through man pages' descriptions for instances of a given keyword.
cat Concatenate and print files.
whoami Displays current username.
id Returns users identity.
hostname Sets or prints the name of the current host system.
uname Prints operating system name.
@tomas-rampas
tomas-rampas / bi5translator.cs
Last active June 10, 2022 13:11
The bi5 translation to C# primitives
using System;
using System.Linq;
namespace Bi5Translator
{
class Program
{
static void Main(string[] args)
{
var bytes = new byte[]{ 0,29,177,144,0,0,48,57,0,0,48,58,63,147,51,51,64,19,51,51};
@tomas-rampas
tomas-rampas / LzmaCompressor.cs
Created June 10, 2022 12:28
Class that compress and decompress files and binary data. It uses LZMA SDK.
using System;
using System.IO;
using System.Runtime.CompilerServices;
namespace Bi5.Net.Utils
{
public static class LzmaCompressor
{
/// <summary>
/// Decompresses compressed file on given path