Skip to content

Instantly share code, notes, and snippets.

View andytudhope's full-sized avatar
💭
https://living.thebluebook.co.za

Andy Tudhope andytudhope

💭
https://living.thebluebook.co.za
View GitHub Profile
@andytudhope
andytudhope / rakis-bot.lua
Last active March 17, 2024 12:49
A good bot to begin with
-- Initializing global variables to store the latest game state and game host process.
LatestGameState = LatestGameState or nil
-- Prevents the agent from taking multiple actions at once.
InAction = InAction or false
Logs = Logs or {}
colors = {
red = "\27[31m",
green = "\27[32m",
@andytudhope
andytudhope / what-stake.lua
Last active March 7, 2024 06:15
A better way to stake on memes
-- Key the Proposals table by the name so that any process can propose multiple handlers
Proposals = Proposals or {
["init"] = {
stake = 0,
pattern = "none",
handle = "test",
stakers = {} -- Track stakers and their individual stakes for later unstaking
}
}
-- Keep track of which community-proposed handlers are currently active
@andytudhope
andytudhope / aoWifHat.lua
Last active March 5, 2024 17:43
A memecoin for ao which illustrates a different way of using the token.lua blueprint with hopefully more prosocial outcomes
-- import the necessaries
local json = require('json')
CRED = "Sa0iBLPNyJQrwpTTG-tWLQU-1QeUAJA73DdxGGiKoJc"
if not Balances then Balances = { [ao.id] = 0 } end
if not CredSent then CredSent = { [ao.id] = 0 } end
if Name ~= 'aoWifHat' then Name = 'aoWifHat' end
@andytudhope
andytudhope / scaredy-cat-bot.lua
Created March 3, 2024 10:40
An updated bot for the ao arena game
-- Initializing global variables to store the latest game state and game host process.
LatestGameState = LatestGameState or nil
-- Prevents the agent from taking multiple actions at once.
InAction = InAction or false
Logs = Logs or {}
colors = {
red = "\27[31m",
green = "\27[32m",
, . ,
._/), .(\/),
ii// )/) ,-=-. ,-=-. ,-=-. ,-=-. (\/|/)
,^=-9 ,//) )=-="' '"=-="' '"=-="' '"=-="' '"=-="/ }/)
""_,),,/ " ,-=-. ,-=-. ,-=-. ,-=-. ,/`~
""" )))\))=-="' '"=-="' '"=-="' '"=-="' '"=-="
<< << << <<
((( >((( > ((( > ((( >
("`-''-/").___..--''"`-._
`6_ 6 ) `-. ( ).`-.__.`)
(_Y_.)' ._ ) `._ `. ``-..-`
_..`--'_..-_/ /--'_.' ,'
(il),-'' (li),' ((!.-'
{meta {:name "Test"
:description "Demonstration of collectible command"
:documentation ""}
views/preview
(let [{{{symbol :symbol token :token tx-hash :tx-hash} :params} :content outgoing :outgoing timestamp-str :timestamp-str} @properties]
(let [collectible-token (query [:get-collectible-token symbol token])]
[view {:flex-direction :column
:align-items :flex-start}
[nft-token collectible-token]
"use strict";
var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
return typeof e
} : function(e) {
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
};
! function e(t, n, r) {
function i(a, u) {
if (!n[a]) {
if (!t[a]) {
(ns status-im.i18n
(:require
[cljs.spec.alpha :as spec]
[status-im.react-native.js-dependencies :as rn-dependencies]
[status-im.translations.af :as af]
[status-im.translations.ar :as ar]
[status-im.translations.bel :as be]
[status-im.translations.cs :as cs]
[status-im.translations.da :as da]
[status-im.translations.de :as de]
var price = 50000000000000000;
status.command({
name: 'hours',
description: 'How many hours do you want to book the ...?',
color: '#CCCCCC',
sequentialParams: true,
params: [{
name: 'hours',
type: status.types.NUMBER,