Skip to content

Instantly share code, notes, and snippets.

View 019ec6e2's full-sized avatar
🕸️

the_magician 019ec6e2

🕸️
View GitHub Profile
@siwalikm
siwalikm / aes-256-cbc.js
Last active October 20, 2024 09:44
AES-256-CBC implementation in nodeJS with built-in Crypto library
'use strict';
const crypto = require('crypto');
const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key
const IV = "5183666c72eec9e4"; // set random initialisation vector
// ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex');
const phrase = "who let the dogs out";
var encrypt = ((val) => {
@psifertex
psifertex / keybindings.json
Last active July 12, 2024 17:06
simple VIM style motion keys for Binary Ninja
{
"Back" : "Escape; Back; Ctrl+[; Meta+O",
"Forward" : "Forward; Ctrl+[; Meta+I",
"Change Type..." : "Shift+Y; ",
"Close Window" : "Ctrl+W; X",
"Command Palette" : "Ctrl+P; Space",
"Copy" : "Ctrl+C; Y",
"Disassembly Graph" : "G, L",
"Display as\\Binary" : "D",
"Display as\\Default" : "D",
@cryptoscopia
cryptoscopia / dydxFlashLoanTemplate.sol
Created October 21, 2020 06:42
A single-file simplest possible template for a contract that obtains a flash loan from dydx, does things, and pays it back.
// SPDX-License-Identifier: AGPL-3.0-or-later
// The ABI encoder is necessary, but older Solidity versions should work
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;
// These definitions are taken from across multiple dydx contracts, and are
// limited to just the bare minimum necessary to make flash loans work.
library Types {
enum AssetDenomination { Wei, Par }
@adietrichs
adietrichs / hevm.md
Last active October 16, 2022 19:35
Dapptools Apple Silicon
@kacperlukawski
kacperlukawski / 01-data-upload.ipynb
Last active December 11, 2023 04:32
Qdrant tips&tricks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hourianto
hourianto / README.md
Last active November 11, 2024 17:15
Current prompts for WebSim (as of July 13, 2024)

Current WebSim prompts and main context. System/User/Assistant blocks denote different roles in the messages array for the API requests. Stuff in {} is either a file that's too big to be inserted directly, or an explanation.

From what I can see, WebSim is mostly "carried" by Claude's creativity.

  • Main prompt: main_prompt.txt - also check main_flow.txt to see how a complete request is made.
  • Edit prompt: edit_prompt.txt- used when right-click editing the element. Uses the currently selected model. I didn't manage to get the whole prompt with the examples, but most of it at least.
  • Fake LLM API prompt: api_prompt.txt - currently WebSim always uses Claude 3.5 Sonnet for this (from info on Discord).
  • Image rewriting prompt: image_gen_prompt.txt - also uses Claude (don't know what model). Not sure what image model is being used, probably some version SDXL (like SDXL Turbo and similar)

The temperature used is 1, at least for Claude.