Skip to content

Instantly share code, notes, and snippets.

View karthik25's full-sized avatar

Karthik Ananth karthik25

View GitHub Profile
@karthik25
karthik25 / default.md
Created July 8, 2025 22:06 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
# List processes - process id & full exe path
Get-Process | Select-Object Id,Path
public class Program
{
public static void Main(string[] args)
{
PrintSummary();
}
private static void PrintSummary()
{
// The call to Run, creates an instance of Validator
@karthik25
karthik25 / DelayedExpansion.bat
Last active July 8, 2016 18:41
Dealing with ERRORLEVEL set by batch files run using the CALL command
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
IF %ERRORLEVEL% == 0 (
CALL :FOO_NEW
CALL :FOO
ECHO Checking global
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO Checking delayed
// Project (Assembly): MefContracts
public interface IGreeting
{
string SayHello();
}
public interface IComplexOp
{
void DoSomething();
}
@karthik25
karthik25 / MefMetaData.cs
Last active January 16, 2019 02:49
A small example to demonstrate the 2 possible ways to provide metadata!
// Project (Assembly): MefContracts
public interface INamedGreeting
{
void SayGreeting(string name);
}
public interface INamedGreetingMetaData
{
string Name { get; }
@karthik25
karthik25 / MefHowTo.cs
Last active January 16, 2019 02:48
A refresher on MEF!
// Project (Assembly): MefContracts
public interface IGreeting
{
string SayHello();
}
public interface IPlugin
{
void PrePageRequest();
@karthik25
karthik25 / DocumentDeserializer.cs
Created June 20, 2013 14:02
A document deserializer using generics
public static class DocumentDeserializer<T>
where T:class
{
public static T Deserialize(string fileName)
{
return Deserialize(new FileStream(fileName, FileMode.Open));
}
public static T Deserialize(Stream fileStream)
{
@karthik25
karthik25 / DbSetFluentExtensions.cs
Created May 5, 2013 04:28
This is a fluent extension that adds RemoveAll method to IDbSet<T>
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
namespace MyApp.Domain.FluentExtensions
{
public static class DbSetFluentExtensions
{
public static IEnumerable<T> RemoveAll<T>(this IDbSet<T> src, IEnumerable<T> list)
where T : class
@karthik25
karthik25 / NestedDocumentConverter.cs
Created March 30, 2013 22:46
Yet another class that will also take care of nested Document(s)
public static class NestedDocumentConverter<T, TU, TV>
where T:class, new()
where TU:class, new()
where TV: Document
{
public static T Convert(TV document)
{
var instance = new T();
var type = typeof(T);
var props = type.GetProperties(BindingFlags.Public | BindingFlags.Instance).ToList();