Skip to content

Instantly share code, notes, and snippets.

@dedlim
dedlim / claude_3.5_sonnet_artifacts.xml
Last active April 24, 2025 19:21
Claude 3.5 Sonnet, Full Artifacts System Prompt
<artifacts_info>
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
@sahilchopra
sahilchopra / Motorcycle.md
Last active February 27, 2025 18:30 — forked from ElioLopez/Grundstoff.md
Fahrschule, driving license germany, berlin

Where should a passenger on a motorcycle with sidecar sit to reduce the risk of tipping over on bends?

  • On the motorcycle
  • The position of the occupants has no significance
  • In the sidecar

You notice that the lever travel of the hydraulic front wheel brake on your motorcycle has become considerably longer. What must you do?

  • Have the front wheel brake repaired
  • Fill up the brake fluid immediately
  • Only use the rear wheel brake until the next service
@everton137
everton137 / german-driving-license.md
Last active February 27, 2025 17:51 — forked from blessanm86/german-driving-license.md
Quick Ref Notes for German Driving License Test

Traffic signs

⭐ What does this traffic sign mean?

image

[x] Indication of existing overhead electrical wires
[x] Rail traffic always has priority
[x] You must always wait when a rail vehicle is approaching
@adrienbrault
adrienbrault / llama2-mac-gpu.sh
Last active April 8, 2025 13:49
Run Llama-2-13B-chat locally on your M1/M2 Mac with GPU inference. Uses 10GB RAM. UPDATE: see https://twitter.com/simonw/status/1691495807319674880?s=20
# Clone llama.cpp
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
# Build it
make clean
LLAMA_METAL=1 make
# Download model
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin
#!/bin/bash
# Remove terminating namespaces
# Usage: ./remove-terminating-ns.sh
TERMINATING_NS=$(kubectl get ns | grep Terminating | awk '{print $1}')
kubectl proxy &
PROXY_PID=$!
@leesaenz
leesaenz / force_remove_sophos.sh
Last active May 5, 2018 07:20
How to Force Remove Sophos Without a Tamper Protection Password MacOS
sudo pkill -f Sophos && sudo rm -rf /Library/Sophos\ Anti-Virus
# Then run their uninstaller.
# Boom, it's gone with or without the tamper password.
@kikitux
kikitux / docker.sh
Last active September 12, 2024 14:07
Install docker-ce in odroid xu4/xu4q linux-arm arm
#!/usr/bin/env bash
set -e
apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository \
"deb [arch=armhf] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
@lmakarov
lmakarov / lambda-basic-auth.js
Created August 30, 2017 19:15
Basic HTTP Authentication for CloudFront with Lambda@Edge
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';

#Setting up Docker Machine on Raspberry PI

  1. SSH into the pi and install docker with curl -sSL https://get.docker.com | sh (If we let Machine try to install the Docker daemon it will fail.)
  2. Change the OS's ID so Docker Machine won't throw errors. sudo nano /etc/os-release and change the line that says ID=raspbian to ID=debian
  3. From a new terminal window run docker-machine create --driver generic --generic-ip-address YOUR-PIS-IP --generic-ssh-key ~/.ssh/id_rsa --generic-ssh-user pi --engine-storage-driver overlay2 MACHINE-NAME
@tokland
tokland / promise_map.js
Last active September 8, 2024 15:10 — forked from anvk/promises_reduce.js
Execute promises sequentially (one at at a time) and return array with the results
function promiseMap(inputValues, mapper) {
const reducer = (acc$, inputValue) =>
acc$.then(acc => mapper(inputValue).then(result => acc.push(result) && acc));
return inputValues.reduce(reducer, Promise.resolve([]));
}
/* Example */
const axios = require('axios');