Skip to content

Instantly share code, notes, and snippets.

@rbrick
rbrick / artifacts...build-info...c7b959fcbba31847bedeecf4657e4425.json
Created November 23, 2022 19:08
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.13+commit.abaa5c0e.js&optimize=false&runs=200&gist=
This file has been truncated, but you can view the full file.
{
"id": "c7b959fcbba31847bedeecf4657e4425",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.13",
"solcLongVersion": "0.8.13+commit.abaa5c0e",
"input": {
"language": "Solidity",
"sources": {
"ThrowawayNFT_flat.sol": {
@rbrick
rbrick / fabf6ed337c6b03a3609297074230883.json
Last active November 23, 2022 18:57
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.13+commit.abaa5c0e.js&optimize=false&runs=200&gist=
This file has been truncated, but you can view the full file.
{
"id": "fabf6ed337c6b03a3609297074230883",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.13",
"solcLongVersion": "0.8.13+commit.abaa5c0e",
"input": {
"language": "Solidity",
"sources": {
"contracts/TelosNFT.sol": {
@rbrick
rbrick / metamask.html
Last active July 12, 2021 05:32
Messing around with Metamask and Ethereum
<!DOCTYPE html>
<html>
<head>
<script src="/assets/js/web3.min.js"></script>
</head>
<body>
<h1 id="status">Not connected.</h1>
@rbrick
rbrick / msa.go
Last active February 9, 2024 05:02
package main
import (
"bytes"
"context"
"crypto/tls"
"encoding/json"
"fmt"
"golang.org/x/oauth2"
"golang.org/x/oauth2/microsoft"
public static void main(String[] args) throws IOException {
final BufferedImage image = new BufferedImage(1024, 1024, BufferedImage.TYPE_INT_ARGB);
final Graphics graphics = image.getGraphics();
int center = image.getWidth() / 2;
int outerRadius = 512;
int segments = 18;
@Command
public void patch(@Flag("patch") File file, @Flag("server") String server) throws IOException {
if (file.exists()) {
System.out.println("Found server jar...patching...");
JarFile bungeecordJar = new JarFile(file);
byte[] newClassFile = null;
Enumeration<JarEntry> entries = bungeecordJar.entries();
while (entries.hasMoreElements()) {
JarEntry jarEntry = entries.nextElement();
@rbrick
rbrick / fixed.java
Last active February 5, 2024 11:15
ClassReader reader = new ClassReader(bungeecordJar.getInputStream(jarEntry));
ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS);
ClassNode node = new ClassNode(); {
reader.accept(node, 0);
}
for (int i = 0; i < node.fields.size(); i++) {
// prevent duplicates if the jar is already patched
{
"routes": {
"/": "assets/html/index.html",
"/images/compass.png": "assets/images/compass.png",
"/js/site.js": "assets/js/site.js",
"/js/util.js": "assets/js/util.js",
"/js/graph.js": "assets/js/graph.js",
"/css/main.css": "assets/css/main.css"
},
"faviconOverride": {
[
{
"name":"DreamZ",
"ip":"dreamz.io",
"type":"PC",
"category":"soup"
},
{
"name":"SoupsMC",
"ip":"soupsmc.com",
@rbrick
rbrick / encoder.go
Last active November 19, 2018 01:05
a minimal implementation of RESP/Redis client
package main
import (
"bytes"
"errors"
"fmt"
"io"
)
const (