This file contains 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
-module(rx_bitmap_sim). | |
-compile(export_all). | |
%%% A simple simulator for the RX and RX2 scratchpad bitmap attacks. | |
%%% run `rx_bitmap_sim:create_report(ProgCount, Divisions)` to see the sizes of bitmaps | |
%%% that would be needed in order to reconstruct the scratchpad from the | |
%%% bitmap for N RandomX programs, with D divisions of the programs. | |
% The number of RX memory cells in the scratchpad. | |
-define(SCRATCHPAD_CELLS, 262144). |
This file contains 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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "(lldb) Launch", | |
"type": "cppdbg", | |
"request": "launch", | |
"program": "${workspaceFolder}/../otp/bin/aarch64-apple-darwin22.6.0/beam.debug.smp", | |
"args": [ | |
"--", "--", |
This file contains 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
function CreateBasicCO() | |
return coroutine.create(function () | |
print("Coroutine started") | |
Send({ Target = ao.id, Action = "TestMessage" }) | |
local msg = BasicReceive({ Target = ao.id, Action = "TestMessage" }) | |
X = msg | |
print(msg) | |
print("Started again. Respond to stuff here.") | |
return msg | |
end) |
This file contains 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 Arweave = require('arweave'); | |
const arweave = Arweave.init({ host: 'arweave.net', protocol: 'https', port: 443 }); | |
const fs = require('fs'); | |
const deepHash = require('arweave/node/lib/deepHash'); | |
const ArweaveBundles = require('arweave-bundles'); | |
const deps = { | |
utils: Arweave.utils, | |
crypto: Arweave.crypto, |
This file contains 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 fs = require('fs') | |
const Arweave = require('arweave/node') | |
const argv = require('yargs').argv | |
const arweave = Arweave.init({ | |
host: argv.arweaveHost ? argv.arweaveHost : 'arweave.net', | |
port: argv.arweavePort ? argv.arweavePort : 443, | |
protocol: argv.arweaveProtocol ? argv.arweaveProtocol : 'https' | |
}) |
This file contains 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
export function handle (state, action) { | |
const owner = state.owner | |
const input = action.input | |
const caller = action.caller | |
const contact = action.contact | |
if (input.function === 'transfer') { | |
const target = input.target | |
if (!target || (caller === target)) { |
This file contains 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
#!/bin/bash | |
mkdir -p CryptoVoxelsArchive/parcels | |
echo "Downloading map info..." | |
curl -s 'https://www.cryptovoxels.com/api/parcels.json' > CryptoVoxelsArchive/parcels.json | |
curl -s 'https://www.cryptovoxels.com/api/suburbs.json' > CryptoVoxelsArchive/suburbs.json | |
curl -s 'https://www.cryptovoxels.com/api/islands.json' > CryptoVoxelsArchive/islands.json |
This file contains 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
pragma solidity ^0.5.1; | |
contract EdLock { | |
address payable honeypot; | |
uint unlockTime; | |
uint payoutQty; | |
uint payoutQtySteal; | |
address payable[] payoutAddrs; | |
bool paidOut = false; |
This file contains 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
#!/usr/bin/env escript | |
%%% USAGE: ./keyboard_morse STRING | |
%%% Uses morse code to send messages to a keyboard light that flashes | |
%%% when a web server request is made. See here[1] for details. | |
%%% This script could be modified to communicate with other kinds of | |
%%% devices by changing the emit_flash/0 function. | |
%%% | |
%%% [1] http://lelandbatey.com/posts/2016/12/Making-lights-blink-for-each-HTTP-request/ |