Skip to content

Instantly share code, notes, and snippets.

View jwinterm's full-sized avatar

John Winter Murphy jwinterm

View GitHub Profile
@jwinterm
jwinterm / moonplace.json
Created February 4, 2023 04:25
moonplace contract ABI
[
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
@jwinterm
jwinterm / moonplace_imgupdate.py
Created February 4, 2023 04:25
Script to update rectangular regions on moonplace.io
import base64
import json
import web3
from PIL import Image
import base64
from io import BytesIO
# Setup web3 things
nova_provider = web3.Web3(web3.HTTPProvider('https://nova.arbitrum.io/rpc'))
@jwinterm
jwinterm / moonplace.json
Created January 28, 2023 15:15
MoonPlace Contract ABI
[
{
"inputs": [
{
"internalType": "string",
"name": "name",
"type": "string"
},
{
"internalType": "string",
@jwinterm
jwinterm / moonplacemap.py
Created January 28, 2023 14:55
Query MoonPlace Contract to Map Minted/Unminted Tiles
import base64
import json
import web3
from PIL import Image
nova_provider = web3.Web3(web3.HTTPProvider('https://nova.arbitrum.io/rpc'))
chain_id = 42170
moonplace_address = '0x934095513c1ff89592A4b8490e263da7a6a4CEAc'
with open('moonplace.json') as f:
@jwinterm
jwinterm / 10kgiveaway.csv
Created December 7, 2021 02:38
CSV file for 10k giveaway
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 1.
AutoModerator,/r/CryptoCurrency/comments/r8b8zr/four_million_subscriber_10000_moon_giveaway/hn4kexy/,"* **[Moon](https://www.reddit.com/r/CryptoCurrency/wiki/moons_wiki) [Pros](https://reddit.com/r/CointestOfficial/wiki/cointest_archive#wiki_moon_pros) & [Cons](https://reddit.com/r/CointestOfficial/wiki/cointest_archive#wiki_moon_cons)** - Participate in the r\/CC [Cointest](https://reddit.com/r/CointestOfficial/wiki/cointest_policy) to potentially win moons. Prize allocations: 1st - 300, 2nd - 150, 3rd - 75.
* Readers are encouraged to visit r/CryptoCurrencyMoons for discussions about [moon tokens](https://www.reddit.com/r/CryptoCurrency/wiki/moons_wiki) instead of r/CryptoCurrency.
* Sort comments as controversial first by [clicking here](https://www.reddit.com/r/CryptoCurrency/comments/r8b8zr/four_million_subscriber_10000_moon_giveaway/?sort=controversial). Doesn't work on mobile.
---
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/c
@jwinterm
jwinterm / python_comment_scraper.py
Created December 7, 2021 02:30
Python code to select winners for 10k MOON giveaway
import csv
import praw
from praw.models import MoreComments
client_id='asdf'
client_secret='asdf'
username='asdf'
password='asdf'
user_agent='asdf'

Keybase proof

I hereby claim:

  • I am jwinterm on github.
  • I am jwinterm (https://keybase.io/jwinterm) on keybase.
  • I have a public key ASA-lO1CSIFERH5VsjoSWXCouFOBk1ssYkVp87quCY2v4Ao

To claim this, I am signing this object:

@jwinterm
jwinterm / command.py
Created January 13, 2018 17:40
Telegram tipbot based on reddcoin bot
import json
import codecs
import requests
from bs4 import BeautifulSoup, SoupStrainer
import re
import subprocess
from telegram.ext.dispatcher import run_async
from telegram.ext import Updater
from html import escape
import os
import shutil
import praw
from datetime import datetime
from time import strftime
from userpw import *
try:
reddit = praw.Reddit(client_id=client_id, client_secret=client_secret,
username=username, password=password,
@jwinterm
jwinterm / imggen.py
Created December 11, 2017 03:30
Image gen for GRS ticker
# -*- coding: utf-8 -*-
from PIL import Image, ImageChops, ImageFont, ImageDraw
import cmc
import os
def trim(im):
bg = Image.new(im.mode, im.size, im.getpixel((0,0)))
diff = ImageChops.difference(im, bg)
diff = ImageChops.add(diff, diff, 2.0, -100)
bbox = diff.getbbox()