Skip to content

Instantly share code, notes, and snippets.

@parweb
parweb / CursorTools.json
Created February 10, 2025 10:42 — forked from ScriptedAlchemy/CursorTools.json
Reverse Engineering cursor prompts
{
"tools": [
{
"type": "function",
"function": {
"name": "codebase_search",
"description": "Find snippets of code from the codebase most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in particular directories, please specify them in the target_directories field.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.",
"parameters": {
"type": "object",
"properties": {
@parweb
parweb / .block
Last active January 28, 2017 00:30 — forked from mbostock/.block
Chord Diagram
license: gpl-3.0
height: 961
border: no
@parweb
parweb / variadic-generics.php
Created October 13, 2016 20:58 — forked from ramsey/variadic-generics.php
You may type-hint on variadic functions in PHP to enforce type on elements in the array
<?php
class Foo {}
$f1 = new Foo();
$f2 = new Foo();
$bar = function (Foo ...$foo) {
foreach ($foo as $f) {
echo get_class($f) . "\n";
}
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCouponsTable extends Migration
{
public function up()
{
Schema::create('coupons', function (Blueprint $table) {
@parweb
parweb / contain-floats.css
Created April 26, 2011 15:45 — forked from necolas/contain-floats.css
Cross-browser, consistent float-containment methods
/*
* Containing floats in a consistent manner
* By Jonathan Neal and Nicolas Gallagher
*/
/*
* New block formatting context method
* IE 6+, Firefox 2+, Safari 4+, Opera 9+, Chrome
*/
<?php
/**
* AutoHelperView
* Provides automatic helper loading for views.
*
* @author Joe Beeson <[email protected]>
*/
class AutoHelperView extends View {
(function ($) {
$.event.special.textchange = {
setup: function (data, namespaces) {
$(this).bind('keyup', $.event.special.textchange.handler);
$(this).bind('cut paste input', $.event.special.textchange.delayedHandler);
},
teardown: function (namespaces) {