Skip to content

Instantly share code, notes, and snippets.

@rapfaria
rapfaria / agents.md
Created October 12, 2025 02:30 — forked from QINGCHARLES/agents.md
My agents.md/copilot-instructions.md for .Net 10 coding

What AI agents should know about me

C# / ASP.NET Core developer (Razor Pages + Windows Forms) targeting .NET 8–10.

Coding standards & conventions

  • Strong explicit typing; avoid var unless the type is truly obvious or required.
  • PascalCase every identifier (types, members, variables, parameters, generics, Razor artifacts, generated names like App/Builder).
  • Exception: simple loop counters (i, j, k, w, h, x, y, z).
  • Tabs for indentation; opening brace on its own line.
@rapfaria
rapfaria / pre-commit
Created August 27, 2022 01:35 — forked from kcjpop/pre-commit
Git pre-commit hook to run php lint and php-cs-fixer
#!/usr/bin/php
<?php
/**
* .git/hooks/pre-commit
*
* This pre-commit hooks will check for PHP error (lint), and make sure the code
* is PSR compliant.
*
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer)
*
@rapfaria
rapfaria / get.py
Created August 29, 2019 17:57
getting jitter from a list of pings =
#getting jitter from a list of pings =)
def _get_jitter(ping_history):
x = filter(lambda x: x > 0, map(float, ping_history))
return float(sum([abs(x[n]-x[n-1]) for n in range(1,len(x))]))/(len(x) - 1)
# maybe some izip in the future?
@rapfaria
rapfaria / gautotranslate.js
Created May 18, 2011 20:12
Cleans the textarea every 5 seconds (almost)
(function (keystrokeInterval, refreshRate) {
var time = new Date;
var $source = $('#source');
$source.bind('keypress',function(){
time = new Date;
});
var alreadyBound = false;
@rapfaria
rapfaria / gist:868588
Created March 14, 2011 00:24
global retriever fixed
$ : function (arg, nodelist) {
/*global document, error*/
function argToArray(){
arg = (arg.toString().indexOf(",") > -1) ? arg.split(",") : arg;
}
function getElementsFromArray(){
//Is this really necessary? You may benefit from it on the first call,
//since you might not know where does nodelist come from,