Skip to content

Instantly share code, notes, and snippets.

View ryardley's full-sized avatar

гλ ryardley

View GitHub Profile
# ./android/app/src/main/jni/Android.mk
# Set up paths
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# Debug mode
NDK_DEBUG=1
# Specify C++ flags
# ./android/app/src/main/jni/Application.mk
APP_STL := c++_static
@ryardley
ryardley / app.jsx
Last active March 3, 2019 04:53
Creating new handlers every render can cause performance problems.
function App() {
const [count, setCount] = useState(0);
// handler will be created on every render
const handleClick = () => {
setCount(count + 1);
};
return (
<SomePureComponent count={count} onClick={handleClick} />
@ryardley
ryardley / plant_uml_decoder.py
Last active October 31, 2024 13:20
PlantUML url encryption decoder
# Forked from https://gist.github.com/dyno/94ef6bb9644a88d6981d6a1a9eb70802
# https://plantuml.com/text-encoding
# https://github.com/dougn/python-plantuml/blob/master/plantuml.py#L64
import zlib
import base64
import string
plantuml_alphabet = string.digits + \
string.ascii_uppercase + string.ascii_lowercase + '-_'
@ryardley
ryardley / plantuml_server_url_decode.py
Created February 9, 2020 00:10 — forked from dyno/plantuml_server_url_decode.py
plantuml server url decoder encoder
# https://plantuml.com/text-encoding
# https://github.com/dougn/python-plantuml/blob/master/plantuml.py#L64
import zlib
import base64
maketrans = bytes.maketrans
plantuml_alphabet = string.digits + string.ascii_uppercase + string.ascii_lowercase + '-_'
base64_alphabet = string.ascii_uppercase + string.ascii_lowercase + string.digits + '+/'
@ryardley
ryardley / machine.js
Last active April 19, 2021 13:07
Generated by XState Viz: https://xstate.js.org/viz
const fns = {
}
async function attemptConnection() {
return "Thanks!"
}
async function attemptPayment() {
throw new Error('Crapp!!')
{
"basics": {
"name": "Rudi Yardley",
"label": "ETHGlobal finalist, Software Engineer, Web3 Architect, Smart Contract Engineer, Fullstack",
"picture": "",
"email": "r@blockhackers.io",
"phone": "",
"website": "https://blockhackers.io",
"summary": "Key technology: TypeScript, Rust, Solidity, React, Circom, Noir, Solana, Solid.js\n\n Rudi Yardley is a seasoned professional with over two decades of experience as a programmer and software engineer. Since 2017, he has been actively engaged in the Blockchain industry and has held various roles in application development, including Tech Lead/Team Lead, Architecture, Frontend Engineer, Fullstack Engineer and even Graphic Design.\n\nToday, Rudi specializes in providing solutions for DAOs and companies that operate in the web3 space. He has worked on several significant projects in the field and is highly focused on delivering high-quality online applications, exceptional user experiences, and sustainable software of the highest standard.