Skip to content

Instantly share code, notes, and snippets.

@Magicking
Magicking / radiant-kaleid.js
Created January 17, 2025 19:24
Radiant collab with Beryann Parker
c = 0
bpm=180
crown = new Array(13).fill().reduce((acc,e)=>acc.add(shape(3, 0.2, 0.2).color(0.9, 0.6, 0.3).rotate(c+=10, 0.1)), solid())
crown.layer(noise().mask(noise(20).modulate(noise(10).luma(0.9,()=>a.fft[3]*2),0.2))).rotate(2).add(osc(2,0.01,()=>Math.cos(time/1000)*Math.PI))
.modulate(osc(()=>a.fft[1]/1000))
.kaleid([5,25,75,100,75,50,25].smooth(0.2))
.out(o3)
render(o3)
a.show()
@Magicking
Magicking / Radiant sun.js
Created January 16, 2025 21:42
Radiant sun
// License Beerware
// Author Magicking
// Use with hydra.ojack.xyz
c = 0
crown = new Array(13).fill().reduce((acc,e)=>acc.add(shape(3, 0.2, 0.2).color(0.9, 0.6, 0.3).rotate(c+=10, 0.1)), solid())
crown.layer(voronoi().mask(noise(20).modulate(noise(10).luma(0.4,0.9),0.2))).out()
// License Beerware
// Author Magicking
R2 = [249/255,185/255,227/255]
R1 = [126/255,90/255,114/255]
B0 = [0,0,0]
G1 = [52/255,83/255,38/255]
G2 = [106/255,168/255,79/255]
noise([10,20,50,150,400].smooth()).color([R2[0],R1[0],B0[0],G1[0],G2[0]].smooth(),
[R2[1],R1[1],B0[1],G1[1],G2[1]].smooth(),
[R2[2],R1[2],B0[2],G1[2],G2[2]].smooth())
@Magicking
Magicking / extension.js
Created October 2, 2024 13:38
Obfuscated hacked extension Soldity for vscode
(function (_0x4e0a6f, _0x1ddeff) {
const _0x359e48 = _0x4e0a6f();
while (true) {
try {
const _0x414d4c = -parseInt(_0x5e9b(476, -0x92)) / 1 * (parseInt(_0x5e9b(480, -0x52)) / 2) + parseInt(_0x5e9b(417, 0x507)) / 3 + parseInt(_0x5e9b(530, 0x58f)) / 4 * (parseInt(_0x5e9b(423, 0x553)) / 5) + -parseInt(_0x5e9b(513, 0x537)) / 6 + -parseInt(_0x5e9b(488, -0x6a)) / 7 + parseInt(_0x5e9b(446, 0x533)) / 8 + parseInt(_0x5e9b(421, 0x550)) / 9;
if (_0x414d4c === _0x1ddeff) {
break;
} else {
_0x359e48.push(_0x359e48.shift());
}
#!/bin/bash
RPC=https://rpc.blast.io
G_ADDRESS=0x971b2d96eFc3cffb8bAcE89A17AbfEd0b8743cD1
# Define the block number and max index if needed
tokenSupply=$(cast call --rpc-url $RPC $G_ADDRESS "totalSupply()(uint256)")
IDX=$(($tokenSupply - 1))
for idx in $(seq 0 $IDX); do
outname=$(printf "%010d" $idx)
#!/usr/bin/env python
import random
import csv
from github import Github
# Authentication is defined via github.Auth
from github import Auth
# using an access token
@Magicking
Magicking / pngdecoder.sol
Created August 17, 2023 13:05
PNG decoding headers in Solidity
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "inflate-sol/InflateLib.sol";
import "solidity-bytes-utils/BytesLib.sol";
import "./BMPEncoder.sol";
library CRC32 {
// SPDX-License: BEER
pragma solidity ^0.8.0;
contract MyBigNFTStorage {
mapping(uint256 => string) public _SVGChunks;
uint256 ChunkCount;
// Limited to 25kb
function loadSVGChunk(uint256 id, string memory chunk) public {
// SPDX-License-Identifier: WTFPL
// Author: [email protected]
pragma solidity >=0.7.0 <0.9.0;
/**
* @title TxIndexRoll
* @dev Roll your place amongst the TxIndex top of your block
*/
contract TxIndexRoll {
@Magicking
Magicking / 0
Last active October 3, 2021 23:49
{
"title":"Asset Metadata",
"type":"object",
"properties":{
"name":{
"type":"string",
"description":"Mire"
},
"description":{
"type":"string",