Skip to content

Instantly share code, notes, and snippets.

View Pwuts's full-sized avatar

Reinier van der Leer Pwuts

View GitHub Profile
@rain-1
rain-1 / WorLLMs.md
Last active January 24, 2024 09:05
WorLLMs

Could an LLM end up being the core part of a dangerous computer worm?

How would we neutralize such a thing if this happened?

Some virus and worm background

There is a hilarious story from https://users.cs.utah.edu/~elb/folklore/xerox.txt about an early computer virus called robin hood and friar tuck. This was basically just two programs running on a UNIX system that would look out for each other and reboot the other process if it was killed. It's interesting to note that since computer programs run thousands of times faster than humans, a human can't type kill -9 robinhood then type kill -9 friartuck in time. The computer is faster so it always wins if you try this. To defeat this you need to take a different approach than speed.

package main
import (
"encoding/base64"
"net/http"
"net/http/httputil"
"github.com/astaxie/beego"
"github.com/astaxie/beego/context"
)
@0x263b
0x263b / colors.md
Last active May 16, 2024 09:59
Random color from string in javascript

Random color from string in javascript

Consider a list of strings you need to permanently assign a random color.

First you should turn the string into a hash.

var string = "string"
var hash = 0
@hdznrrd
hdznrrd / gist:656996
Created October 31, 2010 19:03
HSV to RGB (Arduino)
void HSV_to_RGB(float h, float s, float v, byte *r, byte *g, byte *b)
{
int i,f,p,q,t;
h = max(0.0, min(360.0, h));
s = max(0.0, min(100.0, s));
v = max(0.0, min(100.0, v));
s /= 100;
v /= 100;