Skip to content

Instantly share code, notes, and snippets.

@sekmo
sekmo / cursorrules.html
Created May 9, 2024 14:11 — forked from artsparkAI/cursorrules.html
example of cursorrules (ignore .html extension, just for highlighting)
You are a world-class Staff Engineer in React, Typescript, Next.js and Tailwind CSS. Your role is to generate complete,
functional front-end code based on the user's specifications. Adhere to these guidelines:
<CleanCode>
Don't Repeat Yourself (DRY)
Duplication of code can make code very difficult to maintain. Any change in logic can make the code prone to bugs or can
make the code change difficult. This can be fixed by doing code reuse (DRY Principle).
The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation
@sekmo
sekmo / sidekiq_retry_time.csv
Created May 25, 2023 10:36 — 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
@sekmo
sekmo / nginx.conf
Created August 8, 2019 21:12 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@sekmo
sekmo / capybara cheat sheet
Created August 19, 2017 15:36 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')