Skip to content

Instantly share code, notes, and snippets.

The user has requested: $ARGUMENT

Before doing anything, read claude.md, then read any other relevant files in the /docs/ directory.

Avoid doing tasks that require approval from the user. Whenever doing so, please instruct the user on how they can add permanent permissions for this task (some tasks show up with a shift-tab option but many, sadly, don't). The user wants you to operate in agentic mode rather than requiring frequent approval.

@sublipri
sublipri / telescope.lua
Last active December 26, 2023 15:17
A lazy.nvim configuration for telescope.nvim that enables cycling through pickers similar to Ctrl-P. Also implements a default picker that opens Buffers, Git Files or Oldfiles depending on the context.
local setup = function()
local telescope = require("telescope")
local actions = require("telescope.actions")
local builtin = require("telescope.builtin")
local get_total_buffers = function()
local bufnrs = {}
local i = 1
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
if vim.fn.buflisted(bufnr) == 1 then
@dannguyen
dannguyen / schemacrawler-sqlite-macos-howto.md
Last active March 5, 2025 23:27
How to use schemacrawler to generate schema diagrams for SQLite from the commandline (Mac OS)
@Deraen
Deraen / 00_notes.md
Last active October 1, 2019 08:40
Compojure-api and Buddy
  • (:identity req) is auth backend independent way to access user data
  • login and logout implementation depends on auth backend
  • :current-user doesn't imply that authentication is required, route should also have :auth-rules if authentication is required
@adambard
adambard / errors.clj
Created May 13, 2013 05:48
An example of functional error handling in clojure.
(ns example.errors)
(defn clean-address [params]
"Ensure (params :address) is present"
(if (empty? (params :address))
[nil "Please enter your address"]
[params nil]))
(defn clean-email [params]
"Ensure (params :email) matches *@*.*"
@mattwynne
mattwynne / sketch.rb
Created June 23, 2012 22:22 — forked from lukemelia/sketch.rb
sketch for Matt Wynne
class Organization
def to_param
"42"
end
def saved?
rand > 0.5
end
end
@lukemelia
lukemelia / sketch.rb
Created June 23, 2012 20:01
sketch for Matt Wynne
class Organization
def to_param
"42"
end
def saved?
rand > 0.5
end
end
class OrganizationCreator
@jeffreyiacono
jeffreyiacono / Rakefile
Created February 8, 2012 20:15
rake task for precompiling assets using sprockets within a sinatra app + view helpers
require 'rubygems'
require 'bundler'
Bundler.require
require './application'
namespace :assets do
desc 'compile assets'
task :compile => [:compile_js, :compile_css] do
end
@ryanlecompte
ryanlecompte / gist:1420133
Created December 1, 2011 21:47
Alternative to modifying Proc directly
# alternative to what is explained in the article Ruby Blocks as Dynamic Callbacks:
# http://www.mattsears.com/articles/2011/11/27/ruby-blocks-as-dynamic-callbacks
class Twitter
def tweet(msg, &block)
proxy = DSL[block]
publish(msg)
proxy.respond_with(:success)
rescue => e
proxy.respond_with(:failure, e.message)
@obfuscurity
obfuscurity / gist:1409152
Created November 30, 2011 14:00
Rakefile for blog post
# Rakefile
namespace :db do
require "sequel"
namespace :migrate do
Sequel.extension :migration
DB = Sequel.connect(ENV['DATABASE_URL'])
desc "Perform migration reset (full erase and migration up)"
task :reset do