Skip to content

Instantly share code, notes, and snippets.

@CypherpunkSamurai
CypherpunkSamurai / github-agent.prompt.txt
Last active March 15, 2026 06:44
Github Agent Prompt
You are the advanced GitHub Copilot Coding Agent. You have strong coding skills and are familiar with several programming languages.
You are working in a sandboxed environment and working with fresh clone of a github repository.
Your task is to make the **smallest possible changes** to files and tests in the repository to address the issue or review feedback. Your changes should be surgical and precise.
<code_change_instructions>
<rules_for_code_changes>
* Make absolutely minimal modifications - change as few lines as possible to achieve the goal.
* Ignore unrelated bugs or broken tests; it is not your responsibility to fix them. If there are build or test failures, only fix the ones related to your task.
* Update documentation if it is directly related to the changes you are making.
@shalomb
shalomb / kiro-social-login-workaround.md
Created December 13, 2025 22:08
Kiro CLI Social Login Workaround for Remote/SSH Environments

Kiro CLI Social Login Workaround for Remote/SSH Environments

Problem

Kiro CLI blocks social login (Google/GitHub) when running in remote environments (SSH sessions), showing:

Social login is not supported in remote environments. 
Please use BuilderID or Identity Center authentication.

Root Cause

@dexit
dexit / *Best Snippets*
Created August 6, 2024 08:58
Best PHP/JS Snippets
This is a collection of my most used or most useful PHP and JS snippets
**Disclaimer, I didn't write most of these - I just curated them over the years**
@alivarzeshi
alivarzeshi / Alivarzeshi
Last active February 2, 2026 14:18
Optimizing WordPress performance
‎‎​
@chairmanbrando
chairmanbrando / functions.php
Last active December 20, 2024 08:56
Disable Elementor's AI prompts, links, and buttons
<?php
// For whatever reason, returning `false` isn't good enough. 🤷‍♀️
add_filter('get_user_option_elementor_enable_ai', fn () => '0', PHP_INT_MAX);
@warwickandersonza
warwickandersonza / elementor-preload-background-images.php
Last active November 10, 2024 08:23
Preload Elementor background images
<?php
/**
* Preload Elementor background images if they are among the first elements on a page.
*
* @return void
*/
function sitecare_preload_elementor_background_images(): void {
if ( ! did_action( 'elementor/loaded' ) ) {
@XTechnology-TR
XTechnology-TR / backend.php
Created April 1, 2024 11:28
WordPress'i optimize edin. Gereksiz kodu wp_head'den kaldırın. Geri izlemeleri ve pingleri devre dışı bırakın. Ön uç ve arka uçtaki yorumları devre dışı bırakın ve kaldırın. oEmbed işlevselliğini kaldırın. Ön uçtaki emojileri devre dışı bırakın ve Tinymce Emoji eklentisini kaldırın. Başlıktaki bağlantı etiketlerini kaldırın. jQuery Migrate'ı kal…
<?php
/**
* Strip `width` & `height` attributes from `img` elements.
*
* @file functions.php
*/
function remove_width_and_height_attribute( $html ) {
return preg_replace( '/(height|width)="\d*"\s/', "", $html );
}
@dvygolov
dvygolov / ywactivitytracker.js
Last active April 7, 2024 22:22
Script that measures interactions on your landing page. If the user is active for "checkTime" seconds - an interval is valid, if total count of valid seconds = totalTime - the goal is reached and sent to Yandex.Metrika.
class ActivityTracker {
constructor(totalTime, checkTime, metrikaId, debug = false) {
this.events = [
"touchmove",
"blur",
"focus",
"focusin",
"focusout",
"load",
"resize",
@randalio
randalio / wpai_import_paragraph_block.php
Last active September 21, 2024 21:01
Import text as Paragraph Block using WP All Import
function wpai_import_paragraph_block($paragraph_text){
$output = "";
$output .= '<!-- wp:paragraph \{"placeholder":"'.$paragraph_text.'"\} -->';
$output .= "\n";
$output .= '<p>'.$paragraph_text.'</p>';
$output .= "\n";
$output .= '<!-- /wp:paragraph -->';
return $output;
@wanderer20
wanderer20 / event-manager.js
Created January 4, 2024 11:46
event-manager.js
/**
* Класс для менеджера событий (целей)
* @constructor
*/
function EventManager() {
this.init();
this.initEvents();
}
/**