Skip to content

Instantly share code, notes, and snippets.

View wighawag's full-sized avatar

Ronan Sandford wighawag

View GitHub Profile
@dillera
dillera / reachy-zero.txt
Last active December 29, 2025 13:33
How to setup your Reachy Mini Lite to use a PiZero for Freedom
w w 8 8 w 8888P
w 8d8b. d88b w8ww .d88 8 8 .d8b. 8d8b. 88b. w dP .d88b 8d8b .d8b.
8 8P Y8 `Yb. 8 8 8 8 8 8' .8 8P Y8 8 8 8 dP 8.dP' 8P 8' .8
8 8 8 Y88P Y8P `Y88 8 8 `Y8P' 8 8 88P' 8 d8888 `Y88P 8 `Y8P'
8
1. Flash Trixie
https://www.raspberrypi.com/products/raspberry-pi-zero-2-w/
Use a decent sized SD - 23 or 64GB
@z0r0z
z0r0z / Multisig.sol
Last active March 9, 2022 01:50
Simple gas-optimized multi-signature contract.
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.4;
/// @notice Simple gas-optimized multi-signature contract.
contract Multisig {
event Propose(address indexed proposer, uint256 indexed proposal);
event Sign(address indexed signer, uint256 indexed proposal);
event Execute(uint256 indexed proposal);
error NotSigner();
@swyxio
swyxio / Tailwindcssunreset.scss
Last active February 14, 2024 01:19
Tailwind CSS Un-Reset - un-reset Tailwind's Preflight CSS Reset so that autogenerated HTML looks consistent with the rest of your Tailwind site. - https://www.swyx.io/writing/tailwind-unreset
.unreset {
a {
@apply text-blue-700 underline;
}
p {
@apply my-4;
}
blockquote,
figure {
@BjornvdLaan
BjornvdLaan / BLSExample.sol
Last active April 10, 2023 07:49
Verification of BLS signatures and BGLS aggregate signatures in Ethereum
pragma solidity ^0.4.14;
/*
Example of how to verify BLS signatures and BGLS aggregate signatures in Ethereum.
Signatures are generated using https://github.com/Project-Arda/bgls
Code is based on https://github.com/jstoxrocky/zksnarks_example
*/
contract BLSExample {
0x00 0 STOP
0x01 3 ADD
0x02 5 MUL
0x03 3 SUB
0x04 5 DIV
0x05 5 SDIV
0x06 5 MOD
0x07 5 SMOD
0x08 8 ADDMOD
0x09 8 MULMOD
0x00 0 STOP
0x01 3 ADD
0x02 5 MUL
0x03 3 SUB
0x04 5 DIV
0x05 5 SDIV
0x06 5 MOD
0x07 5 SMOD
0x08 8 ADDMOD
0x09 8 MULMOD
anonymous
anonymous / Untitled
Created January 7, 2017 11:32
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.4+commit.4633f3de.js&optimize=undefined&gist=
/* Copyright (C) Etherplay <[email protected]> - All Rights Reserved */
pragma solidity 0.4.4;
contract Seed {
function computeSeed(uint256 blockHash1, uint256 blockHash2, uint256 blockHash3, uint256 blockHash4,uint256 blockHash5,uint256 blockHash6 ,address player) constant returns(uint64 seed){
return uint64(sha3(blockHash1,blockHash2,blockHash3,blockHash4,blockHash5,blockHash6,player));
}
@augustlate
augustlate / Rect.hx
Last active June 7, 2016 11:18
Bounding Rectangle helper class for kha
//Copyright 2016 August Late. Licensed under zlib.
//Tiny utility class for working with bounding rectangles
import kha.math.Vector2;
import kha.math.FastMatrix4;
class Rect {
//Computes the smallest axis aligned rect that will contain the transformed rect.
public static function transform(rect : Rect,m : FastMatrix4) : Rect {
var r = new Rect();
@fponticelli
fponticelli / Server.hx
Last active April 29, 2016 15:51
A multi-process webserver with abe and nodejs + cluster.
import abe.App;
import bl.server.*;
import js.Node.*;
import js.node.Cluster;
import js.node.Os;
import npm.Chalk.*;
class Server {
public static var defaultPort(default, null) = 8787;
public static var defaultHost(default, null) = "0.0.0.0";
@mrcdk
mrcdk / Macros.hx
Created March 31, 2016 00:33
@:enum abstract Something(Int) autoInt() macro
import haxe.macro.Context;
import haxe.macro.Expr;
class Macros {
macro public static function autoInt():Array<Field> {
var fields = Context.getBuildFields();
var t = switch(Context.getLocalClass().get().kind) {
case KAbstractImpl(c):