Skip to content

Instantly share code, notes, and snippets.

@sshh12
sshh12 / cursor-agent-system-prompt.txt
Last active April 7, 2025 10:22
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.
@Antosik
Antosik / Internship.md
Last active April 7, 2025 10:17
Стажировки (Москва)

Список стажировок и вакансий без опыта в Москве

  • Яндекс
    • Программы стажировок
      • Разработка (Python, C++, Java, Go, Kotlin, Scala, C, фронтенд)
      • Анализ данных
      • Информационная безопасность
      • AppSec
      • Бизнес
  • Тестирование
@Roarcannotprogramming
Roarcannotprogramming / banzi.c
Created November 9, 2022 16:35
EXP for NU1L CTF 2022 praymoon
#include "banzi.h"
/*
* socket 占页
* https://www.willsroot.io/2022/08/reviving-exploits-against-cred-struct.html
* 需要在内核中开启 CONFIG_USER_NS=y, 默认开启
*/
void unshare_setup(uid_t uid, gid_t gid) {
int temp;
@decodeandroid
decodeandroid / PatternView.kt
Created August 18, 2024 17:18
Pattern View Jetpack Compose
import android.view.MotionEvent
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.material3.Text
@ashrithr
ashrithr / kerberos_setup.md
Last active April 7, 2025 10:13
Set up kerberos on Redhat/CentOS 7

Installing Kerberos on Redhat 7

This installation is going to require 2 servers one acts as kerberos KDC server and the other machine is going to be client. Lets assume the FQDN's are (here cw.com is the domain name, make a note of the domain name here):

  • Kerberos KDC Server: kdc.cw.com
  • Kerberos Client: kclient.cw.com

Important: Make sure that both systems have their hostnames properly set and both systems have the hostnames and IP addresses of both systems in

@pontusab
pontusab / proximity-prefetch.tsx
Created April 6, 2025 06:43
Next.js Proximity Prefetch (PPF)
"use client";
import { useRouter } from "next/navigation";
import type { ReactNode } from "react";
import { useCallback, useEffect, useState } from "react";
interface ProximityPrefetchProps {
children: ReactNode;
threshold?: number;
predictionInterval?: number;
@michielgerritsen
michielgerritsen / instructions.md
Last active April 7, 2025 10:05
Find old Luma code so you can convert it to Hyvä Alpine.js code

Introduction

The goal of this script is to help you migrate you old Magento Luma code to Hyvä compliant code. Luma used to rely on Require.js to manage it's javascript components. Hyvä relies on Alpine.js for this. For a lot of modules there are already compatibility modules available. Custom code you have to convert yourself.

Usage

There are several ways to use this code:

  • Using Tampermonkey (Chrome) or Greasemonkey (Firefox). If you have that installed just click on "Raw" by the requirejs-finder.user.js file.
  • (Temporary) By injecting it into Magento's head. Open the admin and navigate to Content -> Design -> Click your theme -> HTML -> Head -> Add `` and place the code above between the two script tags.
@bcantoni
bcantoni / pricecharting.py
Created January 23, 2020 00:23
Barcode scanning used video games
#!/usr/bin/env python
'''
By just doing a HEAD operation, we can look at the location returned and extract game system and title:
$ curl -i --head "https://www.pricecharting.com/search-products?type=videogames&q=096427015055"
HTTP/2 307
content-type: text/html; charset=utf-8
location: https://www.pricecharting.com/game/nintendo-ds/cooking-mama-2-dinner-with-friends?q=096427015055
x-appengine-log-flush-count: 0
x-cloud-trace-context: 95201b263e270f913954a519333070f4