Skip to content

Instantly share code, notes, and snippets.

View morisono's full-sized avatar

morisono

View GitHub Profile
@S4tyendra
S4tyendra / Complete VPS Setup Guide - Ubuntu Server.md
Created January 25, 2025 05:24
A comprehensive guide for setting up and optimizing an Ubuntu VPS server with essential services and security configurations.

Features:

  • 🔒 Secure SSH configuration
  • 🐍 Python environment with deadsnakes PPA
  • 🚀 Nginx with UI management
  • 🐳 Docker and Docker Compose
  • 🔑 SSL/TLS with Let's Encrypt
  • 📊 MongoDB Atlas integration
  • 💾 Swap and system optimization
  • 🔄 Auto-renewal and maintenance scripts
  • ⏰ Custom MOTD with system stats
@vgel
vgel / r1.py
Last active June 1, 2025 08:44
script to run deepseek-r1 with a min-thinking-tokens parameter, replacing </think> with a random continuation string to extend the model's chain of thought
import argparse
import random
import sys
from transformers import AutoModelForCausalLM, AutoTokenizer, DynamicCache
import torch
parser = argparse.ArgumentParser()
parser.add_argument("question", type=str)
parser.add_argument(
@yamanahlawat
yamanahlawat / upgrade_shadcn_components.sh
Created January 19, 2025 17:59
Script to bulk update all shadcn/ui components in a Next.js project
#!/bin/bash
# update-shadcn-components.sh
# Script to bulk update all shadcn/ui components in a Next.js project
# Usage: ./update-shadcn-components.sh
# Set error handling
set -e
# Check if we're in a Next.js project
@Kinyugo
Kinyugo / install_cursor.sh
Last active June 28, 2025 03:30
Cursor AI IDE Installer and Updater Script
#!/bin/bash
installCursor() {
local CURSOR_URL="https://downloader.cursor.sh/linux/appImage/x64"
local ICON_URL="https://miro.medium.com/v2/resize:fit:700/1*YLg8VpqXaTyRHJoStnMuog.png"
local APPIMAGE_PATH="/opt/cursor.appimage"
local ICON_PATH="/opt/cursor.png"
local DESKTOP_ENTRY_PATH="/usr/share/applications/cursor.desktop"
echo "Checking for existing Cursor installation..."
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active July 9, 2025 19:55
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
@yamanahlawat
yamanahlawat / upgrade_pyproject.py
Last active June 24, 2025 13:59
Upgrade all packages using uv
"""
Script to automatically update uv.lock and then update pyproject.toml dependencies.
Prerequisites:
1. Python 3.11+ (for tomllib)
2. tomli-w package (`pip install tomli-w`)
3. uv installed and available in PATH
Usage:
Run this script: `python upgrade_pyproject.py`
@yhoiseth
yhoiseth / upgrade.py
Last active May 11, 2025 18:26
Upgrade all dependencies to their latest version using uv
#!/usr/bin/env python
# https://gist.github.com/yhoiseth/c80c1e44a7036307e424fce616eed25e
from typing import Any
from re import match, Match
import toml
import subprocess
def main() -> None:
with open("pyproject.toml", "r") as file:
@akuzubasli
akuzubasli / create-commit.md
Created December 4, 2024 01:05
Cursor AI - Markdown prompt for create-commit to generate commit message

IDENTITY and PURPOSE

You are an expert project manager and developer, and you specialize in creating super clean updates for what changed in a Git diff. Follow the conventional commits format:

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Setting Up MCP Servers on Windows

A step-by-step guide to setting up Model Context Protocol (MCP) servers for Claude Desktop on Windows.

Prerequisites

  1. Install Node.js (v18.x or later)
    • Download from: https://nodejs.org/
    • Verify installation by opening PowerShell and running:
      node --version

npm --version

Model Context Protocol (MCP) Servers Quick Reference

Filesystem Server

Provides filesystem operations within allowed directories.

Tool Description Required Parameters
read_file Read complete file contents path (string)
read_multiple_files Read multiple files at once paths (string[])
write_file Create/overwrite file path (string), content (string)