This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@keyframes blink { | |
0% { | |
opacity: 1; | |
} | |
49% { | |
opacity: 1; | |
} | |
50% { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |