Skip to content

Instantly share code, notes, and snippets.

View itseduvieira's full-sized avatar

Edu itseduvieira

View GitHub Profile
@itseduvieira
itseduvieira / CLAUDE-snippet.md
Created September 18, 2025 11:54
Add this to your existing CLAUDE.md so it can handle your file duplication problem

Web App Development Guidelines

🚨 CRITICAL: File Management Protocol

READ FIRST: docs/file-management-spec.md

Before Making ANY Changes:

  1. List affected files explicitly
  2. State file operations clearly:
@itseduvieira
itseduvieira / file-management-spec.md
Last active September 18, 2025 11:58
Specification for file management in Claude Code

File Management & Version Control Specification

Problem Statement

When working with Claude Code on web applications, a common issue occurs where Claude creates new files with updated logic but leaves old files with outdated logic intact. This leads to:

  • Mixed old and new logic in the codebase
  • Inconsistent application behavior
  • Overcomplicated file structure
  • Claude using outdated files as reference in subsequent changes
@itseduvieira
itseduvieira / autoscroll.js
Created September 14, 2025 18:15
Autoscroll website script
setTimeout(() => {
(function () {
var jq = document.createElement('script');
jq.src = 'https://code.jquery.com/jquery-3.6.0.min.js';
jq.onload = function () {
var easing = document.createElement('script');
easing.src = 'https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js';
easing.onload = function () {
$(function () {
@itseduvieira
itseduvieira / file-upload.js
Last active October 22, 2021 13:48
Image upload with AngularJS + Node.js + Firebase
// Angular controller
$scope.imageUpload = function(event, index) {
var files = event.target.files //FileList object
for (var i = 0; i < files.length; i++) {
var file = files[i]
var reader = new FileReader()
reader.onload = (function(index){
return function(e) {