Skip to content

Instantly share code, notes, and snippets.

View lcanady's full-sized avatar

Lem Canady lcanady

  • DigiBear Creative
  • Salem, OR
  • 12:16 (UTC -07:00)
  • X @lcanady
View GitHub Profile
/*
=============================================================================
===== Dies Irae Language System ============================================
This is the language systtem for Dies Irae. It's a simple system that allows
players to set their default language, and their current language. The system
is tied into the posing system, so when you pose, it will mask your language
skills in your dialogs.
There are a few commands to make the system work - but mostly it's tied to
@lcanady
lcanady / damage.sh
Created July 29, 2024 11:59
Damage system shell script
#!/bin/bash
# World of Darkness Precise Damage and Healing Calculator
# Writtren by Diablerie @ Dies Irae MUSH
# Read input from environment variables
bashing=${MUSHQ_0:-0}
lethal=${MUSHQ_1:-0}
agg=${MUSHQ_2:-0}
damage=${MUSHQ_3:-0}
export const disciplines: IMStat[] = [
{
name: "Animalism",
type: "discipline",
values: [1, 2, 3, 4, 5],
hasSpecialties: true,
template: ["vampire"],
error: "You must be a vampire.",
specialties: [
{
{
contract: 'Gotchi',
summary: 'This contract is an ERC1155 token contract for the game Gotchi. It allows users to mint and manage their own Gotchi pets. The contract includes functions for feeding, playing, and sleeping with the Gotchi pets. The contract also keeps track of the hunger, boredom, and energy levels of the pets.',
findings: [
{
type: 'Reentrancy',
description: 'The contract uses the ReentrancyGuard library to prevent reentrancy attacks.',
recommendation: 'No action needed.',
severity: 'Low'
},
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"contractName": "BadRNG",
"auditDate": "2023-09-15",
"auditors": ["ChatGPT Auditor", "Solidity Expert"],
"codeExplanation": "The smart contract named 'BadRNG' is a raffle system where participants can enter by sending a certain amount of ether. A winner is then picked pseudo-randomly and awarded the accumulated funds. However, there are certain vulnerabilities associated with this contract.",
"analysis": [
{

Nakamigos Contract Analysis

The Nakamigos contract seems to be an Ethereum-based NFT minting and management system. It has a stepped Dutch auction mechanism, an allowlist claim mechanism based on an EOS snapshot, and other functionalities.

1. State Variables

uint256 public constant MAX_SUPPLY = 20000;
uint256 public constant MAX_TOKENS_PER_PURCHASE = 10;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
contract Signing is Ownable {
address public importantAddress;
constructor(address _importantAddress) {
importantAddress = _importantAddress;
@lcanady
lcanady / mushcode.peg
Created February 24, 2022 20:09
A PEG for making ASTs out of Mushcode!
// mushcode Grammar
// Author: Lemuel Canady, Jr
// This grammar is really basic, but it gets the job done!
blocks = blocks: block* { return blocks.flat() }
block = _"["_ block: args* _ "]"
{
return {block}
} / args
@define @create (.*)=(.*) {
@if not(isdbref(v($2))) = {
@create $1;
&$2 me = lastcreate(me, t);
@set $1 = safe inherit;
}
}
@define msg\((.*)\) {
@pemit %#=%chGame>%cn $1
/*
##############################################################################
Random @defines!
This is a collection of shortcuts that I've found genereally handy
while authoring MUX flavored MUSHcode.
##############################################################################
*/
@define @create (.*)=(\w+)(?:\,(.*))? {