This tutorial shows how to compile and run RISC-V assembler code on Debian Linux systems, which are not running on a RISC-V system (e.g. x86_64).
sudo apt-get install qemu qemu-system-misc qemu-user gcc-riscv64-unknown-elf
Save this as hello.s:
This tutorial shows how to compile and run RISC-V assembler code on Debian Linux systems, which are not running on a RISC-V system (e.g. x86_64).
sudo apt-get install qemu qemu-system-misc qemu-user gcc-riscv64-unknown-elf
Save this as hello.s:
# ChatGPT result of this question: | |
# write a Python script, where the user can move a sprite with cursor keys, using PyGame | |
import pygame | |
# Initialize PyGame | |
pygame.init() | |
# Set up the screen (width, height, caption) | |
size = (700, 500) |
(ns test | |
(:require [clojure.string :refer [split-lines]]) | |
(:require [clojure.set :refer [intersection]])) | |
(def rucksacks "vJrwpWtwJgWrhcsFMMfFFhFp | |
jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL | |
PmmdzqPrVvPwwTWBwg | |
wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn | |
ttgJtRGJQctTZtZT | |
CrZsJsPPZsGzwwsLwLmpwMDw") |
#include <assert.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <execinfo.h> | |
/* | |
compile this program like this: | |
gcc -Wall -O0 -g -fsanitize=address -fno-omit-frame-pointer -finstrument-functions test.c -o test |
# library installation: | |
# pip3 install -U selenium | |
# pip3 install webdriver-manager | |
# | |
# usage: | |
# first start Chrome in debug mode: | |
# google-chrome --remote-debugging-port=1234 | |
# then: | |
# - sign in to MetaMask and select right network and account | |
# - connect to OpenSea |
#include <conio.h> | |
#include <time.h> | |
#include <stdlib.h> | |
extern void waitvsync(); | |
extern unsigned short setvideomode(); | |
extern void restorevideomode(unsigned short old); | |
extern void setcolor(unsigned short farbe); | |
extern void setpixel(unsigned short x,unsigned short y); |
#!/bin/bash | |
# first create an API key at coinmarketcap.com. It is free for personal use. Set it in a variable: | |
export API_KEY="11111111-1111-1111-1111-111111111111" | |
# now you can call the API with curl, and extract the result with jq | |
# for example to get the quote for a crypto currency in USD: | |
coinquote() { | |
curl -s -H "X-CMC_PRO_API_KEY:$API_KEY" -H "Accept:application/json" \ | |
-d "symbol=$1&convert=USD" \ |
starting server | |
receive address: rs1qahw577c0p6t95vsuz9ets6zdu3tewl2uu7mgh0 | |
mining coins | |
name: metaroot | |
blocks until auction starts: 6 | |
blocks until auction reveal: 4 | |
blocks until auction close: 9 | |
record on the blockchain: | |
{ | |
"records": [ |
;;;; infix to prefix function and reader macro | |
;; BSD 2-Clause License | |
;; | |
;; Copyright (c) 2021, Frank Buss | |
;; All rights reserved. | |
;; | |
;; Redistribution and use in source and binary forms, with or without | |
;; modification, are permitted provided that the following conditions are met: | |
;; |