Skip to content

Instantly share code, notes, and snippets.

dedlim / claude_3.5_sonnet_artifacts.xml
Last active July 21, 2024 20:00
Claude 3.5 Sonnet, Full Artifacts System Prompt
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
Changaco / btrfs-undelete
Last active July 18, 2024 18:18
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
# SPDX-FileCopyrightText: Copyright (c) 2023 ave9858 <>
# SPDX-License-Identifier: CC0-1.0
$ErrorActionPreference = "Stop"
$regView = [Microsoft.Win32.RegistryView]::Registry32
$microsoft = [Microsoft.Win32.RegistryKey]::OpenBaseKey([Microsoft.Win32.RegistryHive]::LocalMachine, $regView).
OpenSubKey('SOFTWARE\Microsoft', $true)
$edgeUWP = "$env:SystemRoot\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
$uninstallRegKey = $microsoft.OpenSubKey('Windows\CurrentVersion\Uninstall\Microsoft Edge')
$uninstallString = $uninstallRegKey.GetValue('UninstallString') + ' --force-uninstall'
vindarel /
Last active June 25, 2024 03:56
Notes on Common Lisp VS Clojure


CL's compiler

The thing in CL I miss most doing Clojure as my day job? CL's compiler. I like having a compiler tell me at compile time about the mistakes I've made. Bogus arguments. Unreachable code because of unhandled exceptions, and so on. CL saves me round after round of bugs that in clojure aren't found until you run the code. If you test well, it's found when testing, if you don't it's found in production. "Clojure compiler" almost demands air quotes.

CL's optional but oh-so-useful model of type declarations is also infinitely more useful (to me) than Clojure's use of "spec", and instrumentation that happens only at test time because of the cost. Depending on the OPTIMIZE declarations, other type defs are a floor wax and dessert topping. Want checks for argument types? Lower optimizations. Want most efficient machine code? High optimizations.

/u/Decweb, March 2023

syafiqfaiz /
Last active June 22, 2024 20:31
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored
rcarrata /
Last active May 21, 2024 16:22
Script for regenerating the kubeconfig for system:admin user
echo "create a certificate request for system:admin user"
openssl req -new -newkey rsa:4096 -nodes -keyout $AUTH_NAME.key -out $AUTH_NAME.csr -subj "/CN=system:admin"
echo "create signing request resource definition"
marcelloinfoweb /
Created July 24, 2020 13:26
Install vscode on Clear Linux
echo "--- start"
wget -O code_latest_amd64.tar.gz
cderv / 00-New
Last active May 12, 2024 17:29
New computer setup
# installed by winget
winget install PowerShell-Preview
winget install git
git config --global "Christophe Dervieux"
git config --global
winget install rstudio
winget install vscode
winget install -e R
winget install Github.GithubDesktop
A Python script that utilizes the OpenAI API to generate Python code based on user prompts, execute the generated code, check for errors, and suggest new features while ensuring their correctness.
cmbaughman /
Created October 12, 2020 14:14
Install Firefox Developer Edition On Linux

Installing the latest Firefox Developer Edition on Linux


You need to have the application curl installed. Most Linux distros will already have it included. However, you may need to run either:


$ sudo dnf -y install curl