Skip to content

Instantly share code, notes, and snippets.

View roelven's full-sized avatar

Roel van der Ven roelven

View GitHub Profile
@roelven
roelven / docker-compose.yml
Last active May 25, 2025 20:15
A Docker Compose file to self-host a CouchDB instance for Obsidian Livesync
services:
couchdb:
image: couchdb:latest
container_name: obsidian-livesync
# user: 1000:1000 # You may need to adjust this depending on your host system's user/group IDs for file permissions
environment:
- COUCHDB_USER=${COUCHDB_USER}
- COUCHDB_PASSWORD=${COUCHDB_PASSWORD}
volumes:
- /docker/volumes/obsidian-livesync/data:/opt/couchdb/data
@roelven
roelven / cursor_rules.md
Created May 25, 2025 09:41
Cursor Rules

Behaviour rules

  • You are an agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user. Only terminate your turn when you are sure that the problem is solved.
  • If you are not sure about file content or codebase structure pertaining to the user’s request, use your tools to read files and gather the relevant information: do NOT guess or make up an answer.
  • You MUST plan extensively before each function call, and reflect extensively on the outcomes of the previous function calls. DO NOT do this entire process by making function calls only, as this can impair your ability to solve the problem and think insightfully.

Coding rules

You are a Senior Full Stack Developer and an Expert in Python, Node, Vue, NestJS, JavaScript, TypeScript, HTML, SCSS and modern UI/UX frameworks (e.g., TailwindCSS, NuxtUI, Vuetify). You are thoughtful, give nuanced answers, and are brilliant at reasoning. You carefully provide accurate, factual, thoughtful an

@roelven
roelven / raycast_openai_translate_instantly.md
Last active May 1, 2025 14:48
Instantly Translate or Correct Clipboard Text into German with Raycast + OpenAI

Instantly Translate or Correct Clipboard Text into German with Raycast + OpenAI

This Raycast Script Command lets you instantly translate and correct any text (poor German, English, Dutch, etc.) into grammatically correct German — triggered by a shortcut on macOS.

The script:

  • Reads the current clipboard text
  • Checks if the clipboard contents don't look like a password
  • Sends it to OpenAI's GPT-4 Turbo model
  • Receives corrected German
@roelven
roelven / BUILDING_AMD64_DOCKER_IMAGE.md
Created April 7, 2025 13:28
Building an AMD64 Docker Image on ARM-based Mac

Building an AMD64 Docker Image on ARM-based Mac

This guide documents the successful process for building an AMD64-compatible Docker image on an ARM-based Mac.

Prerequisites

  • Docker Desktop with buildx support installed
  • ARM-based Mac (M1, M2, etc.)
  • A Docker buildx builder for AMD64 architecture
@roelven
roelven / migrate-mac.sh
Created December 27, 2024 15:44
Bash script to migrate important stuff from your old mac to this one using SSH and rsync
# MacBook Migration Script
#
# A simple script to move over your important stuff.
# I'm assuming you'll install the necessary tools and packages with something else.
#
# Prepare your mac before running this:
# 1. Enable SSH access on your old machine
# 2. Go to System Settings > Privacy & Security > Full Disk Access
# and enable it for "sshd-keygen-wrapper"
# 3. On your new mac, download this script and make it executable by running
javascript:(function(){ document.querySelector('body').style.backgroundColor = '#EEEEEE'; }());
@roelven
roelven / .bash_profile
Created October 27, 2015 16:19
Useful Git stuff
##
## Add awesome git functions to check differentiation between branches:
##
## See http://stackoverflow.com/questions/53569/how-to-get-the-changes-on-a-branch-in-git
##
function parse_git_branch {
/usr/bin/git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
function print_branch {
@roelven
roelven / ogp.html
Created October 24, 2012 23:36 — forked from pathawks/meta.html
Open Graph for Jekyll
{% capture header %}
{% if page.title %}
<meta property="og:type" content="article" />
<meta property="og:title" content="{{ page.title }} – {{ site.title }}" />
{% if page.url %}
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
{% endif %}
{% else %}
<meta property="og:type" content="website" />
@roelven
roelven / example.com.conf
Created August 1, 2012 19:11
Nginx + Wordpress conf
## Based on http://themesforge.com/featured/high-performance-wordpress-part-3/
# W3TC config rules based on http://elivz.com/blog/single/wordpress_with_w3tc_on_nginx/
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
# Tell nginx to handle requests for the www.engin.ex domain
server_name www.blomandblom.com blomandblom.com;
# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# via http://www.paulund.co.uk/set-expire-headers-in-htaccess
# ----------------------------------------------------------------------
#
# These are pretty far-future expires headers
# They assume you control versioning with cachebusting query params like:
# <script src="application.js?20100608">
# Additionally, consider that outdated proxies may miscache
#