Skip to content

Instantly share code, notes, and snippets.

@0xTemporal
0xTemporal / siws.ts
Last active February 11, 2025 20:48
SIWS Better Auth plugin
import type { SolanaSignInInput, SolanaSignInOutput } from '@solana/wallet-standard-features'
import { verifySignIn } from '@solana/wallet-standard-util'
import { type BetterAuthPlugin, type User, setSessionCookie } from 'better-auth'
import { APIError, createAuthEndpoint } from 'better-auth/api'
import { addMinutes, isBefore } from 'date-fns'
import { ulid } from 'ulid'
import z from 'zod'
// based on SIWS (https://github.com/phantom/sign-in-with-solana)
@kccnma
kccnma / index.html
Created February 11, 2025 19:47
webtest1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Website Test 1</title>
<link rel="stylesheet" href="css/style.css">
</head>
@choco-bot
choco-bot / Install.txt
Created February 11, 2025 19:47
string-replicator v1.0.0.0 - Failed - Package Tests Results
2025-02-11 19:37:53,765 4876 [DEBUG] - XmlConfiguration is now operational
2025-02-11 19:37:55,983 4876 [DEBUG] - Adding new type 'CygwinService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2025-02-11 19:37:55,998 4876 [DEBUG] - Adding new type 'CygwinService' for type 'IInstallSourceRunner' from assembly 'choco'
2025-02-11 19:37:56,031 4876 [DEBUG] - Adding new type 'PythonService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2025-02-11 19:37:56,066 4876 [DEBUG] - Adding new type 'PythonService' for type 'IListSourceRunner' from assembly 'choco'
2025-02-11 19:37:56,081 4876 [DEBUG] - Adding new type 'PythonService' for type 'IInstallSourceRunner' from assembly 'choco'
2025-02-11 19:37:56,129 4876 [DEBUG] - Adding new type 'PythonService' for type 'IUninstallSourceRunner' from assembly 'choco'
2025-02-11 19:37:56,201 4876 [DEBUG] - Adding new type 'RubyGemsService' for type 'IAlternativeSourceRunner' from assembly 'choco'
2025-02-11 19:37:56,485 4876 [DEBUG] - Adding new typ
namespace IJuniorConsole;
public class Program
{
private static void Main(string[] args)
{
Shop shop = new Shop("Всё по 42");
Seller seller = new("Кирилл", new[] { new Commodity("Кружка", 42), new Commodity("Расчёска", 42), new Commodity("Книга", 42), new Commodity("Конфета", 42), new Commodity("Головка от штатива SLIK-U6000 Б/У", 42) });
Buyer buyer = new("Гена", 210);
shop.Serve(seller, buyer);
@Arnazz10
Arnazz10 / .deps...remix-tests...remix_accounts.sol
Created February 11, 2025 19:47
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
return address(0);
}
}
@lvanasse
lvanasse / ci-sim-03.log
Created February 11, 2025 19:45
[sim-03] CI Log for nuttx @ 381d3fe64f4da2b09f12bd8f0cd2d1f07d86b3d3 / nuttx-apps @ fb0c1e10ded2a6fb9f066b9893662cbcc86e4646
Script started on 2025-02-11 19:24:51+00:00 [COMMAND="/home/ludovic/nuttx-release/run-job.sh sim-03" <not executed on terminal>]
Now running https://github.com/lupyuen/nuttx-release/blob/main/run-job.sh
Called by https://github.com/lupyuen/nuttx-release/blob/main/run-ci.sh
+ job=sim-03
+ neofetch
.-/+oossssoo+/-.
`:+ssssssssssssssssss+:`
-+ssssssssssssssssssyyssss+-
.ossssssssssssssssssdMMMNysssso.
/ssssssssssshdmmNNmmyNMMMMhssssss/
@ibrhmkoz
ibrhmkoz / schemafull-json-over-object-types.md
Last active February 11, 2025 20:02
Why use schemafull json over object types?

The key reason for wanting schemafull JSON alongside object types in EdgeDB comes down to proper modeling of composite values that share their lifecycle with a parent entity. Let me explain with a concrete example:

Consider a Setting resource that looks like this:

{
    "id": "e2ba936c-fdfd-4873-8732-fb748e3f7f94",
    "isActive": true,
    "memberId": "member1",
    "workspaceId": "workspace1",
 "trigger": {
package com.model;
import jakarta.persistence.*;
/**
* Entity representing an address.
*/
@Entity
public class Address {
@clayoster
clayoster / dnsquery,.yaml
Created February 11, 2025 19:44
kube deployment example
apiVersion: apps/v1
kind: Deployment
metadata:
name: dnsquery
labels:
app: dnsquery
spec:
replicas: 1
selector:
matchLabels: