Skip to content

Instantly share code, notes, and snippets.

extends Sprite
const VELOCITY: float = -1.5
var g_texture_width: float = 0
func _ready():
g_texture_width = texture.get_size().x * scale.x
func _process(delta: float) -> void:
position.x += VELOCITY
#include "lib/error_functions.h"
#include "sockets/unix_socket.h"
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define BACKLOG 5
#include "lib/error_functions.h"
#include "sockets/unix_socket.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
struct sockaddr_un addr;
extends Node2D
### Export variables
export var g_copies_of_each: int = 2
# y measured from bottom of sprites, so characters all line up
export var g_min_y: int = 860
export var g_max_y: int = 860
export var g_min_spawn_wait_ms = 1000
export var g_max_spawn_wait_ms = 2000
export var g_path: String = ""
const NAMES = ["katie", "adam", "jefra"];
function Pill(): JSX.Element {
const [name, setName] = useState(NAMES[0]);
const nameIndexRef = useRef(0);
// 1. Delete name
// 2. When name length is 0, increment nameIndex and start adding new name
// 3. When new name is finished, go back to step 1
useEffect(() => {
@keyframes blink {
0% {
opacity: 1;
}
49% {
opacity: 1;
}
50% {
import Arweave from "arweave";
import dotenv from "dotenv";
dotenv.config();
const arweave = Arweave.init({
host: "arweave.net",
port: 443,
protocol: "https",
timeout: 20000, // Network request timeouts in milliseconds
logging: false, // Disable network request logging
import { ArweaveSigner, createData } from "arbundles";
import axios from "axios";
import dotenv from "dotenv";
dotenv.config();
const sendToBundler = async () => {
const jwk = JSON.parse(process.env.KEY);
const signer = new ArweaveSigner(jwk);
const item = createData("hello", signer);
await item.sign(signer);
import {
Connection,
ParsedInstruction,
ParsedTransactionWithMeta,
PartiallyDecodedInstruction,
PublicKey,
} from "@solana/web3.js";
import { Maybe } from "formfn-shared/dist/types/UtilityTypes";
import { TOKEN_PROGRAM_ID } from "@solana/spl-token";
import { Connection } from "@solana/web3.js";
import { Maybe } from "types/UtilityTypes";
import arraySum from "utils/array/arraySum";
import sleepMs from "utils/sleepMs";
async function getRecentPerformanceSamples(
connection: Connection,
minutesLookback: number
) {
const recentPerfSamples = await connection.getRecentPerformanceSamples();