Skip to content

Instantly share code, notes, and snippets.

View mguinada's full-sized avatar

Miguel Guinada mguinada

  • BeBanjo
  • Lisbon, Portugal
View GitHub Profile
@rodion-m
rodion-m / prompt-for-agents.md-generation.md
Last active October 16, 2025 22:01
Prompt for AGENTS.md file creating
### ABOUT
Modern AI coding tools converge on a simple idea: give the agent a **single, well-structured Markdown file that explains how your repo “works,”** and prepend that file to every LLM call so the agent never has to guess about architecture, commands, or conventions. Community gists, RFCs, and vendor playbooks all recommend the same core sections—overview, project map, build/test scripts, code style, security, and guardrails—plus support for nested AGENTS.md files that override one another hierarchically.

### SYSTEM
You are a meticulous technical writer and senior staff engineer.  
Your task is to create **AGENTS.md** for the repository whose contents are provided below.

### CONTEXT (replace the JSON blocks)
See the attached files.
@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active August 9, 2022 07:38
Rails 5.2 with webpacker, bootstrap, stimulus starter

Rails 5.2 with webpacker, bootstrap, stimulus starter

This gist will collects all issues we solved with Rails 5.2 and Webpacker

Create Project

# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
(ns css.core
(:require [garden.core :refer [css]]
[garden.stylesheet :refer [at-keyframes at-media]]))
(def styles (atom {})) ;; styles cache
;; ignore this code, it generates unique short class names
(def cls->id (atom {}))
(def vc* (atom {:id 0
@athos
athos / deps.edn
Last active June 2, 2024 08:57
Try on your terminal `clojure -Sdeps '{:deps {hello-clojure/hello-clojure {:git/url "https://gist.github.com/athos/b68b15b08efedffaf14d8c020b125202" :git/sha "099bdf7d565b2c35c1df601abf58514cc5276237"}}}' -M -m hello-clojure`
{:paths ["."]
:deps {clansi/clansi {:mvn/version "1.0.0"}}}

⚠️ this is now stupidly out of date

Computers

  • 13" Macbook Pro 3.3 GHz i7 (late 2016)
  • Microsoft Surface Book (2016)

Peripherals

@shiroyasha
shiroyasha / dog.rb
Created February 16, 2016 22:20
Method tracer for Ruby classes
class Dog
attr_writer :name
def initialize(name)
@name = name
end
def bark
puts "patrick"
end
@loganlinn
loganlinn / core.cljs
Last active August 29, 2015 14:04
2048 with om, om-tools
(ns om-2048.core
(:require-macros
[cljs.core.async.macros :refer [go go-loop]])
(:require
[clojure.string :as str]
[cljs.core.async :as async :refer [<!]]
[dommy.core :as dommy]
[om.core :as om]
[om-tools.core :refer-macros [defcomponentk]]
[om-tools.dom :as dom :include-macros true]))
@john2x
john2x / 00_destructuring.md
Last active September 24, 2025 00:52
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

$ rails console
Loading development environment (Rails 3.0.6)
ruby-1.8.7-p334 :001 > r = Rails.application.routes
Gives you a handle of all the routes (config/routes.rb)
#Inspect a named route:
ruby-1.8.7-p334 :005 > r.recognize_path(app.destroy_user_session_path)
=> {:action=>"destroy", :controller=>"sessions"}
@nickleefly
nickleefly / vagrant-docker-ssh.md
Last active April 11, 2020 05:27
vagrant docker ssh

Vagrant Docker

If you are build a saas, using VMs and management tools. You will find vagrant is useful for additional features.

But Virtual machines take too much time to load. Now there is a new trending called using docker. Docker is written in go, if you haven't heard of, you should probably go to check it out. In this article I am going to run a docker container in vagrant virtual machine

What is vagrant

Vagrant is a tool for building complete development environments. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases development/production parity, and makes the "works on my machine" excuse a relic of the past.