Skip to content

Instantly share code, notes, and snippets.

@harmoniemand
harmoniemand / img url
Last active January 19, 2024 14:25
promt with image
{ "model": "gpt-4-vision-preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "%promt%" }, { "type": "image_url", "image_url": { "url": "%img_url%" } } ] } ], "max_tokens": 300 }
@harmoniemand
harmoniemand / ModelWithSecret.go
Created January 3, 2024 22:16
GOLANG Secrets in Models
// thanks to @patrick246
package scrapers
import (
"encoding/json"
)
type Secret string
package wordrevert
func ReadUntil(text []rune, search rune) []rune {
read := []rune{}
for _, char := range text {
if char == search {
break
}
<html>
<head>
<title>PoseNet Detection</title>
<script src="https://unpkg.com/ml5@latest/dist/ml5.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.js"></script>
<script src="sketch2.js"></script> <!--js file-->
<style>
/* video {
width: 100vw;
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
#* VisualStudio Code
choco install vscode -y
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
code --install-extension platformio.platformio-ide --force
#include <Arduino.h>
#include "bsec.h"
#include <Arduino.h>
/*
* LAB: 17
* Name: ESP32 I2C Scanner
* Author: Khaled Magdy
/*
simple wave interference script for openjscad, takes a while to render
https://openjscad.com/
*/
function main() {
@harmoniemand
harmoniemand / Jufo-Bundeswettbewerb-Arrow-Operation
Last active May 27, 2021 14:24
Jufo-Bundeswettbewerb-Arrow-Operation
// Greasemonkey Script für die Jugendforscht PLattform 2021
// Plugin: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
// ==UserScript==
// @name Jufo-Bundeswettbewerb-Arrow-Operation
// @version 1
// @grant none
// ==/UserScript==
@harmoniemand
harmoniemand / GetOffset.ts
Last active June 26, 2018 15:49
Calculate Offset in HTML while using offset and scrolling
/*
License: MIT (https://opensource.org/licenses/MIT)
*/
GetOffset(from: any, to: any): PositionModel {
let pos = new PositionModel();
var parent = from.offsetParent;
pos.X = from.offsetTop;
pos.Y = from.offsetLeft;
String.prototype.fizz = function (i) {
return this + (i % 3 == 0 ? 'fizz': '');
};
String.prototype.buzz = function (i) {
return this + (i % 5 == 0 ? 'buzz': '');
};
for (var i = 0; i < 20; i++) {
console.log(i + " :".fizz(i).buzz(i));