Skip to content

Instantly share code, notes, and snippets.

View wilsonsilva's full-sized avatar

Wilson Silva wilsonsilva

View GitHub Profile
@wilsonsilva
wilsonsilva / default.md
Created June 22, 2025 08:26 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
for plugin in $(asdf plugin list); do
echo "Removing plugin $plugin"
asdf plugin remove "$plugin"
done
@wilsonsilva
wilsonsilva / rack_sse.ru
Created April 17, 2025 20:24 — forked from raggi/rack_sse.ru
Rack SSE Example
# rack_sse.ru
#
# An example of basic real-time, single-room broadcast chat using Server Sent
# Events in plain old Rack. This example does NOT use hijack, or the async
# hacks, it just relies on a well implemented threaded Rack server (at time of
# writing this will therefore only work with puma!). Other servers should be
# fixed to support this, as it is pretty critical to how Rack *should* work on
# most servers. The only spec-acceptable failure in this case is not flushing
# the content stream on each yield (for which the rack spec has no workaround
# today).
@wilsonsilva
wilsonsilva / agent loop
Created March 11, 2025 04:13 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@wilsonsilva
wilsonsilva / one-sqlite-db-per-account.rb
Created December 23, 2024 12:42
Creating a new sqlite db on the fly when a new account gets created
# Source https://x.com/benigartenmann/status/1871117811072065877
class Account < GlobalRecord
after_create_commit :create_shard
private
def create_shard
yaml_config = YAML.load_file("config/database.yml", aliases: true)
root_db_config = ActiveRecord::Base.connection_db_config.configuration_hash.deep_dup.freeze
tenant_shard_config = root_db_config.merge(
@wilsonsilva
wilsonsilva / hello_wayland.c
Created December 16, 2024 16:29
hello_wayland.c
#include <stdio.h>
#include <wayland-client.h>
int main(int argc, char *argv[]) {
struct wl_display *display = wl_display_connect(NULL);
if (!display) {
fprintf(stderr, "Failed to connect to Wayland display\n");
return 1;
}
@wilsonsilva
wilsonsilva / ollama_prune.sh
Created October 27, 2024 08:13
Ollama prune
# Deletes all ollama model
ollama list | awk 'NR>1 {print "ollama rm " $1}' | sh
@wilsonsilva
wilsonsilva / sidekiq_retry_time.csv
Created October 22, 2024 07:26 — forked from marcotc/sidekiq_retry_time.csv
Sidekiq retry exponential backoff formula times
Retry count Retry Time Total Cumulative Time Total Cumulative Days
0 0:00:00 0:00:00 0.0
1 0:00:16 0:00:16 0.0
2 0:00:31 0:00:47 0.0
3 0:01:36 0:02:23 0.0
4 0:04:31 0:06:54 0.0
5 0:10:40 0:17:34 0.0
6 0:21:51 0:39:25 0.0
7 0:40:16 1:19:41 0.1
8 1:08:31 2:28:12 0.1
@wilsonsilva
wilsonsilva / ssl_proxying.md
Created May 26, 2024 15:40
Configuring SSL Proxying in Charles Proxy
  1. Configure SSL Proxying: Proxy -> SSL Proxying Settings...
  • Click on the + button
  • On the Host write api.unify.ai
  • On the Port write 443
  • Click on the Done buttons
  1. Enable the macOS proxy: Proxy -> macOS Proxy
  2. Install the root certificate: Help -> SSL Proxying -> Install Charles Root Certificate
  3. Trust the certificate:
  • Open Keychain Access
  • Open the tab Certificates
@wilsonsilva
wilsonsilva / ghcd.sh
Created May 23, 2024 16:52
Change directory (cd) into a local github repository
ghcd() {
if [ -z "$1" ]; then
echo "Usage: ghcd <username/repo>"
else
wd github
folder_name=$(echo "$1" | cut -d "/" -f1)
repo_name=$(echo "$1" | cut -d "/" -f2)
cd "$folder_name/$repo_name"
fi
}