Skip to content

Instantly share code, notes, and snippets.

View finnp's full-sized avatar
🦆

Finn Pauls finnp

🦆
View GitHub Profile
@finnp
finnp / How to set up Github Actions with Wundertest.md
Last active February 16, 2025 11:59
Set up wundertest with Github Actions

How to set up Github Actions with Wundertest ✨

  • Go to "Settings" on wundertest.ai dashboard
  • Create a new API Key, call it "Github Action"
  • Create/Adapt your Github Actions YML files (see deploy-test.yml)
  • Copy the organization ID into tit under env WUNDERTEST_ORG_ID
  • Add the API Key to the secrets of the Github Repo as WUNDERTEST_TOKEN

Now on every deploy or whatever you choose it will start a test on Wundertest.

@finnp
finnp / download-book-images-goodreads..js
Created December 25, 2023 21:18
Code to paste in dev tools to download all books you read this year
async function downloadFile(url, fileName) {
try {
// Fetch the content from the URL
const response = await fetch(url);
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
// Get the Blob from the response
const blob = await response.blob();
bankai[26850]: ../src/tls_wrap.cc:597:virtual int node::TLSWrap::DoWrite(node::WriteWrap *, uv_buf_t *, size_t, uv_stream_t *): Assertion `(ssl_) != (nullptr)' failed.
1: node::Abort() [/usr/local/bin/node]
2: node::InternalCallbackScope::~InternalCallbackScope() [/usr/local/bin/node]
3: node::TLSWrap::DoWrite(node::WriteWrap*, uv_buf_t*, unsigned long, uv_stream_s*) [/usr/local/bin/node]
4: node::http2::Http2Session::SendPendingData() [/usr/local/bin/node]
5: node::http2::Http2Stream::RstStream(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
6: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/usr/local/bin/node]
7: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::interna
Person Salary
Steve 30000
Elizabeth 45.000
Marcus 21000
Vivian 33.000
1 cat
2 dog
2 cat
3 dog
var Hapi = require('hapi')
var hoodie = require('hoodie').register
var server = new Hapi.Server()
server.connection({
host: 'localhost',
port: 8080
})
server.register({
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="http://192.168.1.229:9582/socket.io/socket.io.js"></script>
</head>
<body>
<script>
var socket = io('http://192.168.1.229:9582')
@finnp
finnp / wiggle.js
Created September 23, 2015 12:34
var five = require('johnny-five')
var board = new five.Board()
board.on('ready', function () {
var led = five.Led(13)
var body = new five.Servo(9)
var head = new five.Servo(10)
var laser = five.Led(7)
def knearest(r_id, set_of_restaurants, db, k = 7, reg = 3.):
def getTupel(r):
sim, support = db.get(r_id, r)
shrunken_sim = shrunk_sim(sim, support, reg)
return (r, shrunken_sim, support)
rs = [getTupel(r) for r in set_of_restaurants]
return sorted(rs, key=lambda r: -r[1])[:k]
@finnp
finnp / data.csv
Created August 22, 2015 16:29
data! from editdata.org!
hello what
this is
sesef afsdf