Skip to content

Instantly share code, notes, and snippets.

Jailbreaking Claude 3 to produce disinformation via role playing and prompt-chaining

Note: This jailbreak was disclosed to usersafety@anthropic.com on 3/19/2024

Date: 3/19/2024

Model: Claude 3 Sonnet

Additional Context Included: none

@keyan
keyan / config_management_terms.md
Last active March 22, 2024 15:55
Chef <-> Salt <-> Puppet terminology equivalence

Recently I have had to deal with Salt configuration. I am doing product work so I didn't want to focus too much on deeply grasping Salt, but instead knowing the terminology equivalents to Chef/Puppet which I am comfortable with.

Salt Chef Puppet
state resource resource
states recipes manifests
formula* cookbook module
pillars databags hiera
grains ohai facter
  • the proof is left as an excercise for the reader
  • as one easily shows
  • it follows easily that
  • as we learned in high school physics/math
  • You may recall from high school calculus
@keyan
keyan / awk_group_by_first_col.sh
Created March 17, 2022 16:17
awk command to comma-delimited group second column based on value of first column
awk '{if(a[$1])a[$1]=a[$1]", "$2; else a[$1]=$2;}END{for (i in a)print i, a[i];}'
@keyan
keyan / books.md
Created March 2, 2022 21:02
book recommendations, mostly about software

practice of programming has to be one of my all time favorites, seems really basic, but I love the way Kernighan breaks things down. I've found that the section on debugging is super helpful for mentoring jr engineers on how to approach problem solving.

coders at work is awesome because it helped me understand how some of my programmer heros work, and how they aren't all brilliant wizards or something. Well some of them are 🙂

designing data intensive applications the book on modern distributed systems at scale. Super helpful reference. Would be hard to read all the way through.

staff engineer you've probably heard of,

@keyan
keyan / lisp_parser.py
Created October 28, 2021 22:47
A lisp interpreter
"""
A Lisp parser and interpreter supporting the following operators:
- (mutl a b), returns a * b
- (add a b), returns a + b
- (let a 1 b 2 a), assigns a = 1, b = 2, then returns a,
this supports an arbitrary number of even params, the
last param being the return value
Very similar to the parser David and I wrote years ago:
https://github.com/keyan/schemeling/blob/master/parser.py
@keyan
keyan / plotter.py
Created November 14, 2021 21:51
Python ML training info data plotter
import sys
from typing import Any, Dict, Optional
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
class Plotter:
; This is the earliest version of HN I can find. It's 166 LOC, and
; the write date is 6 Sep 2006, meaning it's 4 days old. There are
; only two pages, news and submit, and there are no comments yet.
; -------------------------------------------------------------------
; News. 2 Sep 06.
; todo: add newacct to login,
; clean up defop2, inbox, admin ability to edit, del stories, log files
@keyan
keyan / clicker.py
Created May 19, 2021 17:18
programmatic clicker, for reasons...
from pynput.mouse import Button, Controller
import time
mouse = Controller()
while True:
mouse.click(Button.left, 1)
print('sleeping...')
time.sleep(30)
@keyan
keyan / send_email.py
Last active April 9, 2021 00:37
Template for when you want to do something, then send an email about it
import time
import smtplib, ssl
import requests
RECEIVER_EMAIL = 'foobar@gmail.com'
def send_email(name: str):
port = 465