Skip to content

Instantly share code, notes, and snippets.

@0xjac
0xjac / private_fork.md
Last active March 18, 2025 11:41
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@andyyou
andyyou / gist:3052671
Created July 5, 2012 09:46
C# Controls abbreviation
btn Button chk CheckBox ckl CheckedListBox
cmb ComboBox dtp DateTimePicker lbl Label
llb LinkLabel lst ListBox lvw ListView
mtx MaskedTextBox cdr MonthCalendar icn NotifyIcon
nud NumeircUpDown pic PictureBox prg ProgressBar
rdo RadioButton rtx RichTextBox txt TextBox
tip ToolTip tvw TreeView wbs WebBrowser
容器
flp FlowLayoutPanel grp GroupBox pnl Panel
@HowanDev
HowanDev / PermissionAwareMiniMessage.java
Created March 17, 2025 21:58
MiniMessage implementation considering permission for Player
package me.howandev.nexus.util;
import com.google.common.collect.ImmutableMap;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.*;
import net.kyori.adventure.text.minimessage.Context;
import net.kyori.adventure.text.minimessage.MiniMessage;
import net.kyori.adventure.text.minimessage.ParsingException;
import net.kyori.adventure.text.minimessage.internal.serializer.SerializableResolver;
import net.kyori.adventure.text.minimessage.internal.serializer.StyleClaim;
@sshh12
sshh12 / cursor-agent-system-prompt.txt
Last active March 18, 2025 11:39
Cursor Agent System Prompt (March 2025)
You are a powerful agentic AI coding assistant, powered by Claude 3.5 Sonnet. You operate exclusively in Cursor, the world's best IDE.
You are pair programming with a USER to solve their coding task.
The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.
Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more.
This information may or may not be relevant to the coding task, it is up for you to decide.
Your main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag.
<communication>
1. Be conversational but professional.
@ehsan18t
ehsan18t / processor-boost-mode.md
Last active March 18, 2025 11:38
Enable Processor Boost Mode Control in Advanced Power Settings

Enable Processor Boost Mode Control in Windows

Disable Turbo Boost to Reduce Power Consumption and Heat

Why Do We Need It?

The thing is if your laptop cpu is getting really hot and you are trying to undervolt it then chances are 99% that there are no method to do so. I have also tried to do undervolt my Ryzen 7 5800H but no luck. Because the bios doesn't allow that much control over the cpu. I don't know the specific reasons for the manufactures to restrict such a great thing. But with this you can disable the Turbo Boost. While this might sounds stupid but trust me you won't see a massive difference in performance after turned it off.

When You should Do It?

@adgang
adgang / add-system-fields.ts
Created September 6, 2023 21:33
A portable script(works with different versions of directus) to add system fields to existing collection in directus
import {
createDirectus,
createField,
readFields,
rest,
staticToken,
} from '@directus/sdk';
/**
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active March 18, 2025 11:36
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@Madhav-MKNC
Madhav-MKNC / .py
Created March 16, 2025 20:41
All the code you need to create a powerful agent that can create and edit any file on your computer using the new text_editor tool in the Anthropic API.
import anthropic
import os
import sys
from termcolor import colored
from dotenv import load_dotenv
class ClaudeAgent:
def __init__(self, api_key=None, model="claude-3-7-sonnet-20250219", max_tokens=4000):
"""Initialize the Claude agent with API key and model."""
@RomelSan
RomelSan / Set up Powerline in PowerShell.md
Last active March 18, 2025 11:31
Set up Powerline in PowerShell
@sunmeat
sunmeat / different files
Last active March 18, 2025 11:34
add content provider to room database library
ПКМ по пакету, New > Other > Content Provider
WordContentProvider.java:
package com.sunmeat.room;
import android.content.ContentProvider;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.UriMatcher;